In my office we have a system for allocating work that involves
creating a subfolder based on a reference number.
The reference number forms a unique part in the format T#nnnnn at the
start of the folder name, the rest of the folder name is freeformat
text with a description of the task (eg "T#12345 - Set up vbscript"). I
am trying to write a script that will check if a folder exists for a
given reference number, if it does it opens it up in explorer and if it
doesn't, it creates the folder and asks the user to input a description
which is then used in the folder name.
The only way I've been able to do it is to get a list of all the
subfolders and loop through each one checking the first 7 characters,
however this is taking quite a while as we have thousands of these
things.
I have split the folders into ranges of 1000 but it still takes too
long to find. What i'd really like to do is to only return folders with
a name of T#nnnn* when I do the getfolder. I can't seem to find any
other method on the filesystemobject that will do this. Wuld be very
grateful if someone could help me. Ta.