Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: delete files on remote server

I'm not sure what you mean by "get the files on the remote server". Did you mean "delete"?
You might be looking for this:
get -delete * A:\Shares\Ochin-ReportingWorkBench\

(i.e. add the -delete to your first get command)

delete files on remote server

Hello I have written the following script to get files from the remote server and copy them to our local server, this is working fine. Now I want to also get the files on the remote server after they have been copied, but my get - delete isn't working, could someone help me modify my script please.
# Connect
open sftp:...
# Change remote directory
cd /SA223/PHI/RWB
# Download file to the local directory A:\Shares\Ochin-ReportingWorkBench
get * A:\Shares\Ochin-ReportingWorkBench\
# Delete Remote Files (here is the problem)
get -delete * .\
# Disconnect
# Exit WinSCP