Rename with Wildcard

  • Thread starter Bryan in Bakersfield
  • Start date
B

Bryan in Bakersfield

I am trying to copy a file off of a networked drive onto a local server. The
problem is that the filename is variable. It is based off the date and time
that it is ran. Since the time includes the second it was finished running,
I have to use a wildcard to get the file.

SourceFileName = "\\atp-g1\shared\Functional Operations\TEMP Reports\missing
Documents Processing - " & Format(Date, "YYYYMMDD") & "*.*"

FS.copyfile SourceFileName, "C:\"

Unfortunately, all attempts to rename the file have resulted in an error. I
found that I can use the Rename command in a DOS box with wildcards, but when
using the Shell command with the same Rename comamnd, I get an error.

Any ideas on how to rename a file with wildcards?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top