Same script - different results

Advertisement

piotrass
Joined:
Posts:
2
Location:
Poland

Same script - different results

Hello!

I have two virtual machines. Each of them has important data which I would like to transfer automatically by WinSCP.
- The first machine - Windows Server 2016 Datacenter + WinSCP 5.13.1
The batch file is:
open ftp://[login]:[password]@[ftp]/
lcd K:\
cd /
put [name of the folder]
exit
In Task Scheduler as arguments:
/log="C:\Program Files (x86)\WinSCP\WinSCP.log" /ini=nul /script="C:\Program Files (x86)\WinSCP\backup_transfer.bat"

- The second machine - Windows Server 2016 Datacenter + WinSCP 5.13.1
The batch file is:
open ftp://[login]:[password]@[ftp]/
lcd C:\
cd /
put [name of the folder - different than in the first machine]
exit
In Task Scheduler as arguments:
/log="C:\Program Files (x86)\WinSCP\WinSCP.log" /ini=nul /script="C:\Program Files (x86)\WinSCP\backup_transfer.bat"

As you can see - the idea is the same, but I have different results - the first machine works properly, but the second not - there is no data on FTP server after starting the task...
I would be really grateful if you could help me with this weird thing.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Same script - different results

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

piotrass
Joined:
Posts:
2
Location:
Poland

Dear martin,
I've managed to solve the problem - in Task Scheduler (Windows Server):
- Action => Edit Action => Settings
- Program/script => only the name of the BAT file
- Start in => the path to the folder with the file

Reply with quote

Advertisement

You can post new topics in this forum