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

Advertisement

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

Reply with quote

Advertisement

Mark_D
Joined:
Posts:
4
Location:
London, England

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.

Reply with quote

Advertisement

You can post new topics in this forum