A
Aaron via DotNetMonster.com
I am testing for several file types in a directory by creating an array of masks and for each mask in the array, I execute a GetFiles.
My issue is that the VB code:
myDirectoryInfo.GetFiles("*.asp")
is returning not only .asp files, but .aspx files in the directory as well!!!
A test from the Windows command line found that the command "dir *.asp" also returns .aspx files in the directory as well as .asp. This is obviously an issue with the OS so without getting into a Windows Vs. myOS discussion, how can this issue be overcome?
One idea I had is to do a GetFiles("*.*") and then itterate through my mask array and remove files which don't match the masks in the array, but this seemed like an inefficient process.
Your ideas are appreciated!
My issue is that the VB code:
myDirectoryInfo.GetFiles("*.asp")
is returning not only .asp files, but .aspx files in the directory as well!!!
A test from the Windows command line found that the command "dir *.asp" also returns .aspx files in the directory as well as .asp. This is obviously an issue with the OS so without getting into a Windows Vs. myOS discussion, how can this issue be overcome?
One idea I had is to do a GetFiles("*.*") and then itterate through my mask array and remove files which don't match the masks in the array, but this seemed like an inefficient process.
Your ideas are appreciated!