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

Mark_D

Solved it

It was the line space between to two sets of commands
Mark_D

Re: Use a batch file to upen multiple servers and copy files from each

Anonymous wrote:

Hi, I am new to WinSCP and scripting and Batch files so please bare with me.

I managed to get a batch file working to connect to a device with ftp service and download a folder as follows;
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^

   /command ^
    "open ftp://username:password@10.203.61.100/" ^
    "cd /ffs0/niagara/stations" ^
    "lcd ""C:\TONN Backups""" ^
    "get "this folder"" ^
    "exit"

That all works fine. now I want the batch file to move on to another server on the same network and carry out the same process so I tried this;

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^

   /command ^
    "open ftp://username:password@10.203.61.100/" ^
    "cd /ffs0/niagara/stations" ^
    "lcd ""C:\TONN Backups""" ^
    "get "KPMG_15CSQ_L13_DVD_N"" ^
 
    "open ftp://tridium:p1ll1nger@10.203.63.240/" ^
    "cd /ffs0/niagara/stations" ^
    "lcd ""C:\TONN Backups""" ^
    "get "this folder"" ^
    "exit"

and this didn't work.

could anyone point me in the right direction please.

I have about 90 servers dotted around the UK I want to take back up copies of a folder from and would like to use windows scheduler and a batch file to do this automatically once a month.

any help greatly appreciated.

Mark


The above post is from me, i thought I was logged in when i posted it only to find out it posted as a guest.
Guest

Use a batch file to upen multiple servers and copy files from each

Hi, I am new to WinSCP and scripting and Batch files so please bare with me.

I managed to get a batch file working to connect to a device with ftp service and download a folder as follows;
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^

   /command ^
    "open ftp://username:password@10.203.61.100/" ^
    "cd /ffs0/niagara/stations" ^
    "lcd ""C:\TONN Backups""" ^
    "get "this folder"" ^
    "exit"

That all works fine. now I want the batch file to move on to another server on the same network and carry out the same process so I tried this;

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^

   /command ^
    "open ftp://username:password@10.203.61.100/" ^
    "cd /ffs0/niagara/stations" ^
    "lcd ""C:\TONN Backups""" ^
    "get "KPMG_15CSQ_L13_DVD_N"" ^
 
    "open ftp://tridium:p1ll1nger@10.203.63.240/" ^
    "cd /ffs0/niagara/stations" ^
    "lcd ""C:\TONN Backups""" ^
    "get "this folder"" ^
    "exit"

and this didn't work.

could anyone point me in the right direction please.

I have about 90 servers dotted around the UK I want to take back up copies of a folder from and would like to use windows scheduler and a batch file to do this automatically once a month.

any help greatly appreciated.

Mark