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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |