I thought I'd do a little experimentation to determine if there was a way to work around the problem I mentioned in my previous posting. Well it turns out that I am dead in the water because @Files doesn't work anything close to the way I thought it would, and I'm wondering if it is working the way it should. For illustration, the following TCC session:
The pattern that doesn't work is supposed to mean "a dot is required as well as at least two characters before and after the dot".
Clearly, it would appear that the wildcards are being totally ignored. And I will note that the documentation for @File clearly says "Filename may contain wildcards". Well it turns out that a question mark matches a null (i.e., missing) character, which I had never realized before. But even given that, why does a pattern of "???.????" match a file named just "a"? (And is there any way to accomplish what I am trying to achieve other than writing a C++ program?)
Code:
[Z:\TestAtFiles]*dir /S .
Volume in drive Z is RAM Disk Serial number is 8ab4:1647
Directory of Z:\TestAtFiles\*
12/26/2012 13:27 <DIR> .
12/26/2012 13:27 <DIR> ..
12/26/2012 13:10 <DIR> A Directory
12/26/2012 13:10 0 A File.ext
0 bytes in 1 file and 3 dirs
Directory of Z:\TestAtFiles\A Directory\*
12/26/2012 13:10 <DIR> .
12/26/2012 13:10 <DIR> ..
0 bytes in 0 files and 2 dirs
Total for: Z:\TestAtFiles\A Directory\*
0 bytes in 0 files and 2 dirs 0 bytes allocated
Total for: Z:\TestAtFiles\*
0 bytes in 1 file and 5 dirs 0 bytes allocated
143,740,928 bytes free
[Z:\TestAtFiles]Echo %@Files[/S *]
6
[Z:\TestAtFiles]Echo %@Files[/S *??.??*]
6
[Z:\TestAtFiles]ver
TCC 14.03.53 x64 Windows 7 [Version 6.1.7601]
[Z:\TestAtFiles]
Clearly, it would appear that the wildcards are being totally ignored. And I will note that the documentation for @File clearly says "Filename may contain wildcards". Well it turns out that a question mark matches a null (i.e., missing) character, which I had never realized before. But even given that, why does a pattern of "???.????" match a file named just "a"? (And is there any way to accomplish what I am trying to achieve other than writing a C++ program?)