J
Jason
I need to open a file for reading, but I only know part of it's name.
The file I want to read is in the format of xxx-yyyy-zzz.EXT
The last three digits of the file name are different on each pc, for example
PC7 has xxx-yyyy-zz1.ext
PC5 has xxx-yyyy-zz2.ext
PC3 has xxx-yyyy-zz8.ext
and so on.
I need to find out if that file exists by using the first 7 seven digits
and if it does exist, then open it up for reading.
The way I do this now is to loop through the folder, and look at the first
7seven digits using the substing method and if that name equals a constant
(xxx-yyyy) then I open that file.
It works, but it seems like extra work, plus depending on the number of
files it can eat up alot of time.
Any ideas
The file I want to read is in the format of xxx-yyyy-zzz.EXT
The last three digits of the file name are different on each pc, for example
PC7 has xxx-yyyy-zz1.ext
PC5 has xxx-yyyy-zz2.ext
PC3 has xxx-yyyy-zz8.ext
and so on.
I need to find out if that file exists by using the first 7 seven digits
and if it does exist, then open it up for reading.
The way I do this now is to loop through the folder, and look at the first
7seven digits using the substing method and if that name equals a constant
(xxx-yyyy) then I open that file.
It works, but it seems like extra work, plus depending on the number of
files it can eat up alot of time.
Any ideas