i have this script which BKsupport kindly helped me i want this script to zip the files in the source folder first and then copy the zip file to destination folder.
is that possible?
Set fso = CreateObject("Scripting.FileSystemObject")
' Set the Folder Locations
sfolder = "\\lts-srv3\public\datadump1\" ' Folder copying from
dfolder = "\\lts-srv1\users\pgoodway\ian data\" 'Folder copying to
zFile = "\\lts-srv1\users\pgoodway\ian data\ZippedFile.zip"
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
For each folderIdx In files
if folderIdx.DateCreated >= date then
zip sfolder & folderIdx.name, zFile
Function Zip( myFileSpec, myZip )
On Error Resume Next
Set objZIP = CreateObject( "XStandard.Zip" )
objZIP.Pack myFileSpec, myZip, , , 9
Zip = Err.Number
Set objZIP = Nothing
On Error Goto 0
Open in New Window Select All