Find a copy a file with File.Copy method - TechRepublic
General discussion
December 2, 2001 at 08:29 AM
pete.zerger

Find a copy a file with File.Copy method

by pete.zerger . Updated 24 years, 6 months ago

I have a vbscript that I use to parse all log the files in a directory to find the log file created yesterday (using DateCreated property). The script currently zips the logs, but I want to change that.

Once the file has been found, I want to copy it locally to a different directory and rename it in the process. I know how to use File.Copy when I already know file name, but how to I tell File.Copy to copy the file when the I can’t give it an explicit name??

(the log file has a different name every day)

This discussion is locked

All Comments