Post a reply

Options
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)

Options

Topic review

martin

Re: put latest and delete

For upload (and delete), use put not synchronize:

put -delete "C:\Program Files\Sensus\UMSDataExport\Beacon\thefile" /datasync/pending/

To move to archive use:

mv /datasync/pending/thefile /archive/thefile
jroda74

put latest and delete

Need help with a script. I need to copy a file from a local source to an ftp site, then delete it from the local source. I then need to move the file on the ftp site from a pending folder to an archive folder. I have this running on a schedule but it moves all the files from the local directory. Tried doing multiple lines with put -delete as well.


option batch abort
option confirm off

open ############## -hostkey="#########################"

synchronize remote -delete "C:\Program Files\Sensus\UMSDataExport\Beacon" /datasync/pending



exit