How can I search for files with multiple periods in their names using go32 and win32 command line programs? I tried *.*.* but that seems to be expanded by findfirst/findnext into *.* instead. Is there some neat trick I'm missing? :-)
TIA...
Jim

Mailing lists / fpc-pascal / 2001-02
5 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
How can I search for files with multiple periods in their names using go32 and win32 command line programs? I tried *.*.* but that seems to be expanded by findfirst/findnext into *.* instead. Is there some neat trick I'm missing? :-)
TIA...
Jim
How can I search for files with multiple periods in their names using go32 and win32 command line programs? I tried *.*.* but that seems to be expanded by findfirst/findnext into *.* instead. Is there some neat trick I'm missing? :-)
At least Dos only supports one * before "the" period, so I expect windows does the same. Normally, everything before the last persiod is considered as the filename, since loveletter.txt.vbs (hmmm, where do I get this from? :) did get the vbs icon and not that of a text file.
Jonas
The above is correct. There is also another catch. Windows expects there to be only 3 characters for the extension.
So for example:
If you did a wild card search for
*.html
it would return all files with the .html extension.
BUT
if you did a wild card search for
*.htm
It will return not only .htm files but ALSO .html files.
If you specifically ask search for an extension longer then 3 characters it will look for it but if you search for only there characters it wildcards the rest of the characters in longer extensions.
I strongly suspected that go32 programs wouldn't be able to accomplish this (finding files with multiple periods in their names), but I know for a fact that win32 programs can. Now, I've only tested it on NT but if you do Start/Find/Files and search for *.*.* you will indeed find all files that have two periods in them. I just don't know M$'s secret...
I've even tried searched the Win32.hlp file for clues, but can't find anything their either.
Jim
Well that certainly adds another complication to my problem. I had no idea that this wonderful little 'feature' had been added by M$ (which on NT works exactly as you said). Gotta love those guys up in Redmond -- they're always thinking...
Jim