473,791 Members | 3,071 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wildcards in rename()?

Hi all!

Do any of you know if wildcards are accepted when calling rename()
function?

Thanks/Alvaro

Nov 13 '05 #1
10 5121
Alvaro Puente <al************ ********@ece.er icsson.se> scribbled the following:
Hi all! Do any of you know if wildcards are accepted when calling rename()
function?


I'm not sure about this, but I think the ISO C standard does not
guarantee any wildcard support whatsoever. Your own implementation might
provide some but that'll be off-topic here.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"You can pick your friends, you can pick your nose, but you can't pick your
relatives."
- MAD Magazine
Nov 13 '05 #2
On Mon, 14 Jul 2003 10:34:42 +0200, Alvaro Puente wrote:
Hi all!

Do any of you know if wildcards are accepted when calling rename()
function?


no.

--
main(int c,char*k,char*s ){c>0?main(0,"a dceoX$_k6][^hn","-7\
0#05&'40$.6'+). 3+1%30"),puts(" "):*s?c=!c?-*s:(putchar(45) ,c
),putchar(main( c,k+=*s-c*-1,s+1)):(s=0);r eturn!s?10:10+* k;}
Nov 13 '05 #3
In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:
Do any of you know if wildcards are accepted when calling rename()
function?


No, wildcards are a system feature. Try system().

--
-ed- em**********@no os.fr [remove YOURBRA before answering me]
The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
<blank line>
FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
Nov 13 '05 #4
Dan Pop wrote:
In <Xn************ *************** @130.133.1.4> Emmanuel Delahaye <em**********@n oos.fr> writes:

In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:

Do any of you know if wildcards are accepted when calling rename()
function?


No, wildcards are a system feature.

What part of the description of rename() rules out the possibility of
wildcard support?

The part that refers to "...the file whose name is..." can be taken to
expressly rule out any wildcards which match more than one file ;)
Try system().

What part of the description of system() guarantees wildcard support?

It doesn't, but the manner in which the command processor, if any,
executes a string passed to it is to be documented. Hence, I imagine,
the exhortation to "try system()".

S

Nov 13 '05 #5
Dan Pop <Da*****@cern.c h> scribbled the following:
In <Xn************ *************** @130.133.1.4> Emmanuel Delahaye <em**********@n oos.fr> writes:
In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:
Do any of you know if wildcards are accepted when calling rename()
function?
No, wildcards are a system feature. What part of the description of rename() rules out the possibility of
wildcard support? Try system().

What part of the description of system() guarantees wildcard support?


I tried to promise not to get into this argument, but I have to make
this point.
Let's ignore Dan's two arguments above as arguments by themselves, and
consider the fact that he made both of them together.
Dan is saying that it is implementation-dependent whether rename() and
system() support wildcards. Note how he seems to be *advocating* the use
of wildcards in rename() because of this, and *disadvocating* the use of
wildcards in system() because of this.
Why? What makes one implementation-dependent behaviour better than
another? Why couldn't it just as easily be the other way around?

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"It's time, it's time, it's time to dump the slime!"
- Dr. Dante
Nov 13 '05 #6
Dan Pop wrote:

In <Xn************ *************** @130.133.1.4> Emmanuel Delahaye <em**********@n oos.fr> writes:
In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:
Do any of you know if wildcards are accepted when calling rename()
function?
No, wildcards are a system feature.


What part of the description of rename() rules out the possibility of
wildcard support?
Try system().


What part of the description of system() guarantees wildcard support?


What part of "try" says "guarantee? "
What happens if more than one file matches the wildcards?


Whatever the implementation says should happen.

system ("rename *.new *.old");

.... has/had perfectly well-defined behavior on (Open)VMS,
for example.

--
Er*********@sun .com
Nov 13 '05 #7
On 14 Jul 2003 16:08:12 GMT, in comp.lang.c , Joona I Palaste
<pa*****@cc.hel sinki.fi> wrote:
Dan Pop <Da*****@cern.c h> scribbled the following:
In <Xn************ *************** @130.133.1.4> Emmanuel Delahaye <em**********@n oos.fr> writes:
In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:
Do any of you know if wildcards are accepted when calling rename()
function?

No, wildcards are a system feature.
What part of the description of rename() rules out the possibility of
wildcard support?


No part, and thats not precisely what Joona said. What _is_ your
problem? Why not simply augment Joona's response helpfully?
I'm not getting into this kind of argument again... =)

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 13 '05 #8
Mark McIntyre <ma**********@s pamcop.net> scribbled the following:
On 14 Jul 2003 16:08:12 GMT, in comp.lang.c , Joona I Palaste
<pa*****@cc.hel sinki.fi> wrote:
Dan Pop <Da*****@cern.c h> scribbled the following:
In <Xn************ *************** @130.133.1.4> Emmanuel Delahaye <em**********@n oos.fr> writes:
In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:
> Do any of you know if wildcards are accepted when calling rename()
> function?

No, wildcards are a system feature.
What part of the description of rename() rules out the possibility of
wildcard support?
No part, and thats not precisely what Joona said. What _is_ your
problem? Why not simply augment Joona's response helpfully?

I'm not getting into this kind of argument again... =)


Um, Mark, Dan's arguing with Emmanuel Delahaye here, not with me.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Nothing lasts forever - so why not destroy it now?"
- Quake
Nov 13 '05 #9
In <be**********@o ravannahka.hels inki.fi> Joona I Palaste <pa*****@cc.hel sinki.fi> writes:
Dan Pop <Da*****@cern.c h> scribbled the following:
In <Xn************ *************** @130.133.1.4> Emmanuel Delahaye <em**********@n oos.fr> writes:
In 'comp.lang.c', "Alvaro Puente" <al************ ********@ece.er icsson.se>
wrote:
Do any of you know if wildcards are accepted when calling rename()
function?

No, wildcards are a system feature.
What part of the description of rename() rules out the possibility of
wildcard support?

Try system().

What part of the description of system() guarantees wildcard support?


I tried to promise not to get into this argument, but I have to make
this point.
Let's ignore Dan's two arguments above as arguments by themselves, and
consider the fact that he made both of them together.
Dan is saying that it is implementation-dependent whether rename() and
system() support wildcards. Note how he seems to be *advocating* the use
of wildcards in rename() because of this, and *disadvocating* the use of
wildcards in system() because of this.


Don't be idiot! I wasn't advocating anything at all! Merely pointing
out that this is entirely an implementation-specific issue, therefore
Emmanuel's advice was bogus (in the context of this newsgroup).

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
9715
by: Bharath Dhurjati | last post by:
Hello, I am looking for documentation that specifies the following behavior exhibited by java. The following (assuming MyClass.class is accessible and has a main()) java MyClass * yields the same result on Windows as on Unix, inspite of Windows not
1
10634
by: Ralph Noble | last post by:
I thought this problem would go away over the Christmas holiday, but of course it did not. I'm trying to write a stored procedure incorporating wildcards, so I can search for variations. Example, if name 'Smith' is submitted, sproc should retrieve all records containing 'John Smith', 'Zenia Smith', 'Smithfield & Co.' You get the idea. Using SQL Query Analyzer, the query select * from file
3
3504
by: sashi | last post by:
Hi, Is it possible to use wildards in SQL to drop a constraint on a table? Thanks!
11
9178
by: Shyguy | last post by:
I need to import a text file pretty much daily. I download the file and change the name to a standard name and then run the code to import the file into a table in my database. The problem is that the file starts with a standard name but adds the date and some other stuff to the end of the file name. Is there a way I could use a wildcard like "*" so I wouldn't have to change the name? Thanks for any help
6
8328
by: Andy | last post by:
I have a form with several ComboBoxes. One of these is Surname, can I make it select all the Smiths for example by using wildcards? At the moment my query only picks up the individual Surname selected. Perhaps I need to re-work my form, but any ideas would be welcomed. Andy
1
6679
by: Anandan | last post by:
Hi, This is regarding Dataset Filter: WILDCARD CHARACTERS Both the * and % can be used interchangeably for wildcards in a LIKE comparison. If the string in a LIKE clause contains a * or %, those characters should be escaped in brackets (). If a bracket is in the clause, the bracket characters should be escaped in brackets (for example or
19
4662
by: Alan Carpenter | last post by:
Access 8 on Win98 and WinXP I'm having trouble with wildcards in the .Filename property of the FileSearch Object giving different results on win98 and XP. I've been successfully using FileSearch in win98 to fill an array with filenames with no problems since about 1998. From the 97 Help: (The Filename Property of the FileSearch object) --------------------------
2
1189
by: dgr7 | last post by:
hello, I have this code that I'm trying to use but is not working, so I'm posting on here to see if someone can help me with how to fix the error. What the code is trying to do is to look in the subdirectory D:\B D client data\H T\NewBusiness\ for a file that will have (a string of numbers) + (.txt) as it's file name and rename that file to HT012507.txt. There is another file in the same directory named HT.txt that needs to be left alone...
5
36652
by: nidaar | last post by:
From a security point of view, is accepting wildcards like "%" in input parameters of stored procedures against any best practices? As an example, if a user defined function uses "Productname LIKE @ProductName" in WHERE clause of a select statement, and a stored procedure uses the user defined function while passing @ProductName input parameter to the user defined function, is there any security risks? Is there a better way to construct...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.