Hi Again Group,
I have the following code which deletes all file over 7 days old.
sDateTime = Year(dDate) & Right(100 + Month(dDate),2) _
& Right(100 + Day(dDate),2) & "_" & Right(100 + Hour(dDate),2) _
& Right(100 + Minute(dDate),2) & Right(100 + Second(dDate),2)
sFilename = sDateTime & ".zip"
'Delete OLD Data - This Keeps 7 Days worth of Backups
Set Folder = FSO.GetFolder("C:\zips\DataBackup\HFSdata")
For Each File in Folder.Files
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then
FSO.DeleteFile File
Next
What I would like to be able to do is if the file is Less than 24 Hours old
copy the Data to a Zip Disk on Drive Z:
I guess I would Add in something like:
If DateDiff("d", CDate(File.DateLastModified), Now()) > 7 Then FSO.CopyFile
File?? but I can`t find any info on the net tho:( Anybody kindly give me
some code or point me in the right direction?
Many Thanks
Regards
NSC