Automation filetransfer/backup Batch Script

Advertisement

Ep3demic
Joined:
Posts:
4

Automation filetransfer/backup Batch Script

Hi,

I have made a script that "works", but i need to improve it. And i want you guys to look on it, beacuse my scripting skills are not the best.

We have a Remote FTP server that we want to regulary transfer files from to a local folder. We then want to delete the source files from the remote folder on the FTP server.

Here is the FTP Script:

option batch continue  
option confirm off
#Connect to Remote Ftp Server, then map the folder paths
open username@fmsftp.server.no
lcd "E:\Agresso\Data Files\agresso\Data Import\EHF"
cd /out
#Move only the remote files to the local directory
synchronize local "E:\Agresso\Data Files\agresso\Data Import\EHF"
#Then delete all .xml files older than 1 day on the FTP Server
rm *.xml<1D
exit

Here is the most simple backup script:

option batch on
option confirm off
#Connect to server
open username@fmsftp.ftpserver.no
#Simply move the files from the FTP server to a local folder
option transfer binary
cd /
get /out "E:\Agresso\Data Files\agresso\Data Import\EHF backup"
exit

Does these scripts do what i want it too do?
How can i improve them?

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,096
Location:
Prague, Czechia

Re: Automation filetransfer/backup Batch Script

Looks good.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum