| 1. |
Solve : Count Filenames Containing a User-Specified Extension? |
|
Answer» That's the reason - the shortname generation doesn't follow the rules on XP and earlier (and apparantly Win 7 and 8 32 bit). foxidrive, do you sleep during the day?Drat! My Vampire secret is out! (I have insomnia and sleep when I can.) Two replies are in so far - XP 64 bit and Win7 Pro 64 bit - and both show 'standard' 32 bit behaviour. On my Windows 7 x64 as well as Windows 8 x64 systems, Ultimate and Professional respectively (doubt that matters but it might), *.txt matches a .txtx file, and dir /x SHOWS the short FILENAME as having a .txt extension. So my x64 system is the odd one? Another Win7HP 64 bit machine also shows the 'usual' behaviour. It would seem just that the behaviour can't be predicted for short filename generation.Dunno if this sheds any light... D:\test-delete>for /l %A in (1,1,3) do @echo hello world > file%A.lex D:\test-delete>for /l %A in (1,1,3) do @echo hello world > file%A.lexi D:\test-delete>for /l %A in (1,1,3) do @echo hello world > file%A.lexicon D:\test-delete>dir Volume in drive D is SAT-D Volume Serial Number is E8B2-C5D7 Directory of D:\test-delete 20/12/2012 18:12 <DIR> . 20/12/2012 18:12 <DIR> .. 20/12/2012 18:12 14 file1.lex 20/12/2012 18:12 14 file1.lexi 20/12/2012 18:12 14 file1.lexicon 20/12/2012 18:12 14 file2.lex 20/12/2012 18:12 14 file2.lexi 20/12/2012 18:12 14 file2.lexicon 20/12/2012 18:12 14 file3.lex 20/12/2012 18:12 14 file3.lexi 20/12/2012 18:12 14 file3.lexicon 19/12/2012 20:01 43 test.bat 10 File(s) 169 bytes 2 Dir(s) 275,366,141,952 bytes free D:\test-delete>dir /x Volume in drive D is SAT-D Volume Serial Number is E8B2-C5D7 Directory of D:\test-delete 20/12/2012 18:12 <DIR> . 20/12/2012 18:12 <DIR> .. 20/12/2012 18:12 14 file1.lex 20/12/2012 18:12 14 FILE1~1.LE~ file1.lexi 20/12/2012 18:12 14 FILE1~2.LE~ file1.lexicon 20/12/2012 18:12 14 file2.lex 20/12/2012 18:12 14 FILE2~1.LE~ file2.lexi 20/12/2012 18:12 14 FILE2~2.LE~ file2.lexicon 20/12/2012 18:12 14 file3.lex 20/12/2012 18:12 14 FILE3~1.LE~ file3.lexi 20/12/2012 18:12 14 FILE3~2.LE~ file3.lexicon 19/12/2012 20:01 43 test.bat 10 File(s) 169 bytes 2 Dir(s) 275,366,141,952 bytes free D:\test-delete>dir *.lex Volume in drive D is SAT-D Volume Serial Number is E8B2-C5D7 Directory of D:\test-delete 20/12/2012 18:12 14 file1.lex 20/12/2012 18:12 14 file2.lex 20/12/2012 18:12 14 file3.lex 3 File(s) 42 bytes 0 Dir(s) 275,366,141,952 bytes free D:\test-delete>dir *.lexi Volume in drive D is SAT-D Volume Serial Number is E8B2-C5D7 Directory of D:\test-delete 20/12/2012 18:12 14 file1.lexi 20/12/2012 18:12 14 file2.lexi 20/12/2012 18:12 14 file3.lexi 3 File(s) 42 bytes 0 Dir(s) 275,366,141,952 bytes free D:\test-delete>dir *.lex* Volume in drive D is SAT-D Volume Serial Number is E8B2-C5D7 Directory of D:\test-delete 20/12/2012 18:12 14 file1.lex 20/12/2012 18:12 14 file1.lexi 20/12/2012 18:12 14 file1.lexicon 20/12/2012 18:12 14 file2.lex 20/12/2012 18:12 14 file2.lexi 20/12/2012 18:12 14 file2.lexicon 20/12/2012 18:12 14 file3.lex 20/12/2012 18:12 14 file3.lexi 20/12/2012 18:12 14 file3.lexicon 9 File(s) 126 bytes 0 Dir(s) 275,366,141,952 bytes free D:\test-delete>The short name generation is different - but short names can even be random hex numbers in some cases, so it's not an issue. Quote from: foxidrive on December 20, 2012, 02:23:34 PM short names can even be random hex numbers I noticed that when I WENT to 1000 of each extension. |
|