Hi, I wonder if somebody could point me in the right direction.
I have an 'In' folder that users drop all different types of files into (.doc, .xls, .rtf, .pdf etc.).
Each file that gets dropped into the 'In' folder should have a matching .pdf file (i.e. abc123.doc and abc123.pdf)
I have a program which looks into this 'In' directory at regular intervals and moves filename.* to another directory. The folder the files get moved to depends on the first 2 characters of the filename (12-abc.doc might get copied to folder '12' etc).
All the files placed in the 'In' folder should have both a native file and a matching .pdf i.e. (abc123.doc and abc123.pdf)
In some cases the native file is missing. In some cases the .pdf is missing.
There are 2 things that I want to do.
1.) I want to prevent files being moved from the 'In' folder if a .pdf does not exist (I think I can deal with this one ok).
I think perhaps a For Next Loop Array for filenames minus the file extension and if it already exists in the array then copy them (but what if someone has got a .doc and a .xls but no .pdf?!?!? I'm sure somebody could tell me a simple way of achieving this.
2.) This is the part I am struggling with. I need to look in existing folders that files have already been copied to and list:
a.) Native file without matching .pdf
b.) .pdf without matching native file
c.) .pdf with matching native file
I consider myself a reasonable programmer, but this is stumping me right now.
Any help anybody can offer is much appreciated - Thanks.
I have an 'In' folder that users drop all different types of files into (.doc, .xls, .rtf, .pdf etc.).
Each file that gets dropped into the 'In' folder should have a matching .pdf file (i.e. abc123.doc and abc123.pdf)
I have a program which looks into this 'In' directory at regular intervals and moves filename.* to another directory. The folder the files get moved to depends on the first 2 characters of the filename (12-abc.doc might get copied to folder '12' etc).
All the files placed in the 'In' folder should have both a native file and a matching .pdf i.e. (abc123.doc and abc123.pdf)
In some cases the native file is missing. In some cases the .pdf is missing.
There are 2 things that I want to do.
1.) I want to prevent files being moved from the 'In' folder if a .pdf does not exist (I think I can deal with this one ok).
I think perhaps a For Next Loop Array for filenames minus the file extension and if it already exists in the array then copy them (but what if someone has got a .doc and a .xls but no .pdf?!?!? I'm sure somebody could tell me a simple way of achieving this.
2.) This is the part I am struggling with. I need to look in existing folders that files have already been copied to and list:
a.) Native file without matching .pdf
b.) .pdf without matching native file
c.) .pdf with matching native file
I consider myself a reasonable programmer, but this is stumping me right now.
Any help anybody can offer is much appreciated - Thanks.