All Forums >> [Scripting] >> WSH & Client Side VBScript >> Find from file list and then copy to location Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I have searched the forum and can't seem to locate anything on what I want to try and do. I am a novice though so that may explain alot.
I have the directory c:\DailyFiles\Extracted\ with 6 different Excel files in them. Names range of the excel files are all different and change daily. E.g 151. 3018 TLS Data Dump- 27th June 2008.xls
What I am trying to do is copy these files once I have extracted them to this directorty to copy them to separate locations. I have the following code which works if I specify the filename but what I would liek is a loop that will look at the name of each file, look for a selection of common text eg. 3018 and move it to the directory that I want it to go too all from running the vbs file.
The bits that change in thefile are 151. 3018 TLS Data Dump- 27th June 2008.xls
The numbers are sequential but we work monday to friday so this needs to be taken into account.
Does anyone know how I could use a for... next or do... loop function like
do until mid(filename, 4, 9) = 3018 filename = filename exit do loop
Is this possible?
Thanks for any help provided and thanks in advance.