You can do something like that in Perl and it will work on long file names only, but picks up files only, not directories: DIR.pl -------- foreach my $arg (@ARGV) { @files = glob($arg); print "$_\n" foreach(@files); } Tamas On 23/10/06, John Pfaff wrote: > > This is exactly what I would expect. The problem arises when you use > long filenames. All of the filenames you use here are less than 8 > characters, so the long filename and the short filename are the same. > If you have these two files in the same directory > > A long file name.txt > alongf~2.txt > > doing 'dir along*.*' will show both files. Try doing 'dir /x' to show > both long and short filenames and you'll see what I mean. The first > filename will (probably, the number following the tilde may be different > depending on what other files are/were in that directory, and if the > number is multiple digits, that part before the tilde will be shorter to > compensate and make the filename 8 characters) show up as alongf~1.txt. > > M. Adam Davis wrote: > > Still works for me. WinXP, SP2 (5.1.2600). Stock "CMD" command line > > as well as "command" command line (I don't know what, if any, > > difference there is) > > > > I created a directory with files test0001.txt to test0030.txt > > (inclusive) and the commands work as follows: > > > > C:\test>dir test00?0.txt > > Volume in drive C has no label. > > Volume Serial Number is 405E-0160 > > > > Directory of C:\test > > > > 10/23/2006 10:08 AM 0 test0010.txt > > 10/23/2006 10:08 AM 0 test0020.txt > > 10/23/2006 10:08 AM 0 test0030.txt > > 3 File(s) 0 bytes > > 0 Dir(s) 946,507,776 bytes free > > > > C:\test>dir test00?3.txt > > Volume in drive C has no label. > > Volume Serial Number is 405E-0160 > > > > Directory of C:\test > > > > 10/23/2006 10:08 AM 0 test0003.txt > > 10/23/2006 10:08 AM 0 test0013.txt > > 10/23/2006 10:08 AM 0 test0023.txt > > 3 File(s) 0 bytes > > 0 Dir(s) 946,507,776 bytes free > > > > C:\test>dir test00??.txt > > Volume in drive C has no label. > > Volume Serial Number is 405E-0160 > > > > Directory of C:\test > > > > 10/23/2006 10:08 AM 0 test0001.txt > > 10/23/2006 10:08 AM 0 test0002.txt > > 10/23/2006 10:08 AM 0 test0003.txt > > 10/23/2006 10:08 AM 0 test0004.txt > > 10/23/2006 10:08 AM 0 test0005.txt > > 10/23/2006 10:08 AM 0 test0006.txt > > 10/23/2006 10:08 AM 0 test0007.txt > > 10/23/2006 10:08 AM 0 test0008.txt > > 10/23/2006 10:08 AM 0 test0009.txt > > 10/23/2006 10:08 AM 0 test0010.txt > > 10/23/2006 10:08 AM 0 test0011.txt > > 10/23/2006 10:08 AM 0 test0012.txt > > 10/23/2006 10:08 AM 0 test0013.txt > > 10/23/2006 10:08 AM 0 test0014.txt > > 10/23/2006 10:08 AM 0 test0015.txt > > 10/23/2006 10:08 AM 0 test0016.txt > > 10/23/2006 10:08 AM 0 test0017.txt > > 10/23/2006 10:08 AM 0 test0018.txt > > 10/23/2006 10:08 AM 0 test0019.txt > > 10/23/2006 10:08 AM 0 test0020.txt > > 10/23/2006 10:08 AM 0 test0021.txt > > 10/23/2006 10:08 AM 0 test0022.txt > > 10/23/2006 10:08 AM 0 test0023.txt > > 10/23/2006 10:08 AM 0 test0024.txt > > 10/23/2006 10:08 AM 0 test0025.txt > > 10/23/2006 10:08 AM 0 test0026.txt > > 10/23/2006 10:08 AM 0 test0027.txt > > 10/23/2006 10:08 AM 0 test0028.txt > > 10/23/2006 10:08 AM 0 test0029.txt > > 10/23/2006 10:08 AM 0 test0030.txt > > 30 File(s) 0 bytes > > 0 Dir(s) 954,458,112 bytes free > > > > What OS and command line are you using? > > > > -Adam > > > > On 10/23/06, Russell McMahon wrote: > > > >> I suppose this has been broken for years. > >> I'd swear I'd used it recently. > >> > >> DIR ABCD????.JPG etc > >> > >> no longer returns what you'd expect of olde time. > >> > >> And > >> > >> DIR ABCD???3.JPG > >> > >> returns files with abcdef~3.JPG short file names. > >> > >> I suppose you can alter this behaviour somewhere but it's not yet > >> obvious (to me) how. > >> Very annoying. > >> > >> > >> Russell.. . > >> > >> -- > >> http://www.piclist.com PIC/SX FAQ & list archive > >> View/change your membership options at > >> http://mailman.mit.edu/mailman/listinfo/piclist > >> > >> > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- unPIC -- The PIC Disassembler http://unpic.sourceforge.net -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist