A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » General
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

query regarding wild card operation



 
 
Thread Tools Display Modes
  #1  
Old January 24th 07, 04:13 AM posted to microsoft.public.win98.gen_discussion
developer28
External Usenet User
 
Posts: 4
Default query regarding wild card operation

Hello

Can you please tell me how the wild card expansion is done in windows
machine.

For Example, if "test" is the executable and there are 1.prf, 2.prf
and 3.prf in the current directory. Test.exe is executable from c
source code.

Then it should expand in main(argc , argv[]) as follows :

../test -v *.prf

Argv[0] =test.exe

Argv[1]= -v

Argv[2] = 1.prf

Argv[3] = 2.prf

Argv[4] = 3.prf



In Solaris platform it will be expanded as shown above but in windows
it will just take as

D:\test.exe -v *.prf

Argv[0]= test.exe

Argv[1] = -v

Argv[2] = *.prf

Is there any method where we can expand wild card in windows machine as
shown for Solaris machine

Thanks for any help.

Regards.

  #2  
Old January 24th 07, 08:37 AM posted to microsoft.public.win98.gen_discussion
Jeff Richards
External Usenet User
 
Posts: 1,526
Default query regarding wild card operation

It depends on how you are getting the command line and the compiler you are
using. Some functions for getting the command line get the expanded line,
others get it as entered. Some compilers do automatic expansion, others
leave it to the programmer, or perhaps it depends on an option in the
compile command.

It can also be affected by the shell in which the command line is entered -
in some cases the expansion occurs before the command is executed..
--
Jeff Richards
MS MVP (Windows - Shell/User)
"developer28" wrote in message
ups.com...
Hello

Can you please tell me how the wild card expansion is done in windows
machine.

For Example, if "test" is the executable and there are 1.prf, 2.prf
and 3.prf in the current directory. Test.exe is executable from c
source code.

Then it should expand in main(argc , argv[]) as follows :

./test -v *.prf

Argv[0] =test.exe

Argv[1]= -v

Argv[2] = 1.prf

Argv[3] = 2.prf

Argv[4] = 3.prf



In Solaris platform it will be expanded as shown above but in windows
it will just take as

D:\test.exe -v *.prf

Argv[0]= test.exe

Argv[1] = -v

Argv[2] = *.prf

Is there any method where we can expand wild card in windows machine as
shown for Solaris machine

Thanks for any help.

Regards.



  #3  
Old January 24th 07, 02:00 PM posted to microsoft.public.win98.gen_discussion
Tim Slattery
External Usenet User
 
Posts: 227
Default query regarding wild card operation

"developer28" wrote:

Hello

Can you please tell me how the wild card expansion is done in windows
machine.

For Example, if "test" is the executable and there are 1.prf, 2.prf
and 3.prf in the current directory. Test.exe is executable from c
source code.

Then it should expand in main(argc , argv[]) as follows :

./test -v *.prf

Argv[0] =test.exe

Argv[1]= -v

Argv[2] = 1.prf

Argv[3] = 2.prf

Argv[4] = 3.prf



In Solaris platform it will be expanded as shown above but in windows
it will just take as

D:\test.exe -v *.prf

Argv[0]= test.exe

Argv[1] = -v

Argv[2] = *.prf

Is there any method where we can expand wild card in windows machine as
shown for Solaris machine


In Unix systems, like Solaris, the shell expands wildcards, and the
program gets a list of files. In Windows (and DOS before it) the shell
does not perform this service. The program must expand the wildcard.

--
Tim Slattery
MS MVP(DTS)

http://members.cox.net/slatteryt
  #4  
Old January 25th 07, 09:20 PM posted to microsoft.public.win98.gen_discussion
Franc Zabkar
External Usenet User
 
Posts: 1,702
Default query regarding wild card operation

On 23 Jan 2007 20:13:18 -0800, "developer28"
put finger to keyboard and composed:

Hello

Can you please tell me how the wild card expansion is done in windows
machine.

For Example, if "test" is the executable and there are 1.prf, 2.prf
and 3.prf in the current directory. Test.exe is executable from c
source code.

Then it should expand in main(argc , argv[]) as follows :

./test -v *.prf

Argv[0] =test.exe

Argv[1]= -v

Argv[2] = 1.prf

Argv[3] = 2.prf

Argv[4] = 3.prf



In Solaris platform it will be expanded as shown above but in windows
it will just take as

D:\test.exe -v *.prf

Argv[0]= test.exe

Argv[1] = -v

Argv[2] = *.prf

Is there any method where we can expand wild card in windows machine as
shown for Solaris machine

Thanks for any help.

Regards.


The following may be a workaround:

for %i in (*.prf) do D:\test.exe -v %i

- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cardbus Configuration Question Tagman Setup & Installation 4 September 20th 06 10:41 AM
Installing PCMCIA WIFI Card Kills Internet PeteC Networking 4 July 1st 06 04:41 PM
Cannot assign resources to ISA card (missing resources tab) Alex Wenzel General 5 July 7th 05 12:57 PM
dos wild card syntax comm barry martin General 0 August 4th 04 02:47 PM
Wifi card blows out network Mark Adams Networking 0 June 9th 04 09:32 PM


All times are GMT +1. The time now is 05:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.