>I am using Adir() to check a directory for a set of files. A weird thing is happening. Adir() says a file exist but I can't find it. Here's what I found out. Using NT4 and the properties of a file shows the file name and the MS-Dos name of the file which I have found out don't always match. In this case the MS-Dos name for 849710-409A was '852202E'. Just so happens I was using Adir() to find '852202' which it says it found but not really. Is there any way around this?
Instead of ADIR(), use the Scripting.FileSystemObject to open a Folder object and then examine its Files collection - each file object has both the Long File Name and Short File Name (MS-DOS Name) as a property:
oFSO=CREATEOBJ('Scripting.FileSystemObject')
oFolder = oFSO.GetFolder('C:\MyDirToSearch')
FOR EACH oFile IN oFolder.Files
? oFile.Name, oFile.ShortName
ENDFOR
The FSO preserves case, but you'll have to implement your own filter on the Files collection of a Folder object. You can try to retrieve a specific file name using the FSO's GetFile() method.