Hello all,
We're trying to set up a routine in Access that renames a file off of a floppy or other specified drive. The source filename changes with every new disk and therefore cannot be statically named in the code. We're trying to use the Copy File method to search for whatever file is found on the disk, then copy it down to another specified drive and folder location. This is the code we have so far:
Function CopyMPREFile()
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject"
fs.CopyFile "a:\*.dat", "J:\MPRE\MPREScores.txt"
End Function
This should work with the wildcard option as specified in the help text, yet it does not.
Any help you can offer is greatly appreciated.
THANKS!!
We're trying to set up a routine in Access that renames a file off of a floppy or other specified drive. The source filename changes with every new disk and therefore cannot be statically named in the code. We're trying to use the Copy File method to search for whatever file is found on the disk, then copy it down to another specified drive and folder location. This is the code we have so far:
Function CopyMPREFile()
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject"
fs.CopyFile "a:\*.dat", "J:\MPRE\MPREScores.txt"
End Function
This should work with the wildcard option as specified in the help text, yet it does not.
Any help you can offer is greatly appreciated.
THANKS!!