Copy allocated file

G

Guest

Hi all,
I use the following to copy a file to my comp:
'----------------------
Dim SourceFile, DestinationFile
SourceFile = "S:\Backups\HS0731.DBF"
DestinationFile = "C:\Backups\HSLast.DBF"
FileCopy SourceFile, DestinationFile
'----------------------
My issue is that I want to change the SourceFile to the last file of
previous month.
For e.g: This month is August, and the last file created in previous month
was HS0728.DBF, then the SourceFile should change to "S:\Backups\HS0728.DBF".
Any ideas ?
Thanks in advance.
 

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

Similar Threads

Copy Shortcut 2
Code Error 8
Export SQL 1
Export to Excel when password protected 3
expected format 3
Moving Files 4
Create filename based todays date 3
Cycle through all the records in a table 1

Top