Removing files after download

I am trying to use the DownloadDirectory.wsf script to move files from a remote server to my local machine. However, this script only copies files. I would like to remove the files from the remote server after I have downloaded them. I am using the library to do this.

Thanks

Scott

Hello...

Just call the DeleteFile() function after the file is transferred.

In the Shared.vbs you would add the objFTP.DeleteFile(strFile) function before the bRet = true:

result = objFTP.DownloadFile(strFile, strLocalFile, nRestart, 0)
If result = ftpErrorSuccess Then
bRet = true
Else

But before you delete the file I strongly recommend you to check whether the file has been transferred correctly (by comparing the local/remote file size, file integrity checks).

Regards,
-Mat

Thank you