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: Upload all files except current date

fairudyn wrote:

put -delete *.zip -filemask="*<=1D" *

This downloads and deletes all zip files created more than 24 hours ago.
fairudyn

Re: Upload all files except current date

martin wrote:

If I understand your question correctly, then you have the condition otherway around.
It should be:

put *.zip -filemask="*<=1D" *


Hi Martin would this be correct if I choose to delete the rest except those created on the current date?

lcd C:\WEBBACKUP
cd /WebBackup/178

put -delete *.zip -filemask="*<=1D" *

exit
martin

Re: Upload all files except current date

If I understand your question correctly, then you have the condition otherway around.
It should be:

put *.zip -filemask="*<=1D" *
fairudyn

Upload all files except current date

Hi there, just needed help on how could I edit my script to upload all files in a local folder except for the ones created on the current date

So basically I would want to transfer all my backups over to our remote server but on a daily basis leaving 1 copy of backup that is created on that day itself.

lcd C:\WEBBACKUP
cd /WebBackup/178

put -delete -transfer=automatic "*.zip"

exit

Do you think if I changed it to this it will work?

lcd C:\WEBBACKUP
cd /WebBackup/178

put -transfer=automatic "*.zip" -filemask="*>=1D" *

exit