[nflug] Dos vs Bash question

Russell Harrington russellharrington at gmail.com
Thu Jan 22 14:18:50 EST 2009

Windows (or more specifically Dos) doesn't expand the wild card to be the
list of files, it instead passes the wildcard to the program. You would have
to modify the perl script or create a batch script that ran through the
files in the directory and passed them individually to your perl program.

Here is something I found that might lead to some insight

On Thu, Jan 22, 2009 at 1:43 PM, Joshua Johnson
<joshpauljohnson at gmail.com>wrote:

> Windows/Dos question here.
> I have a perl script that takes arguments from the command line. In the
> Bash I can just do "myscript.pl *" which returns a list of all files in that
> directory to my script. In Dos, this script works, but you have to mention
> each file explicitly: "myscript.pl file1 file2 file3". If I do "myscript.pl
> *" it will actually look for a file called "*", which it can't find, and
> quits.
> How can I use wildcards in Dos with this? I know it can be done as "dir
> *.txt" works as expected.
> Thanks in advance,
> Josh
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug

Russell Harrington
Software Engineer
inLighten Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nflug.org/pipermail/nflug/attachments/20090122/cd873fbb/attachment.html

More information about the nflug mailing list