Script works standalone but not in Windows Task Scheduler?

Advertisement

richardcav
Joined:
Posts:
1
Location:
Spain

Script works standalone but not in Windows Task Scheduler?

Hi, newbe here so sorry if this is a stupid question, I have a script that builds a .dat file that gets uploaded by winscp.cmd, the script is...
@echo off
echo open sftp://username@IP/home/domain/public_html/ -hostkey="key" -privatekey="Key" -passphrase=phrase >> ftpcmd.dat
echo put xmlfile.xml >> ftpcmd.dat
echo exit >> ftpcmd.dat
"C:\Program Files (x86)\WinSCP\winscp.com" /script=ftpcmd.dat
del ftpcmd.dat
...and it works perfectly when I execute fileup.bat (the name of the batch file), but when I try to schedule that same batch file, it doesn't work – it runs and stops straight away.

Can anyone please tell me what I'm doing wrong?

Regards
Richard

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum