Topic "Scheduler Task does not work"

Author Message
bloodlessz
[View user's profile]

Joined: 02 Aug 2012
Posts: 2
Hello guys.

I start using WinSCP and i think it is very useful software.

The only problem i have is when i try to run the script under Scheduler Task.
When i run the bat file by double click it works fine.

The the .ini file is on the WinSCP folder.
The bat and txt files is on WinSCP folder.

Local2remote.bat
Code:
winscp.exe /console /script=local2remote.txt /log=C:\Users\myusername\Desktop\log.txt

echo Upload succeeded, moving local files
move \\servername\folder\folder\*.xml \\servername\folder\folder\_folder

move \\servername\folder\folder\*.csv \\servername\folder\folder\_folder


exit

:error



Local2remote.txt


echo Upload failed, keeping local files
Code:

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Force binary mode transfer
option transfer binary
# Establish the connection
open username@domain.com
# Change the Local Directory
lcd "\\servername\folder\folder\"
# Change to the correct Remote directory
cd /folder
# List the local files
lls
# List Remote Files
ls
# Upload *.csv
put "*.csv"
put "*.xml"

exit


Can someone tell me why?

Thank you
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 16466
Location: Prague, Czech republic
Please post a log file for both scenarios.
_________________
Martin Prikryl
bloodlessz
[View user's profile]

Joined: 02 Aug 2012
Posts: 2
I find the problem. Cool

To Task Scheduler i fill the area Start in.

At the first i assumed that is not mandatory because i give the full path of the bat file.

Now it is wotking.

Thank you
Advertisements

You can post new topics in this forum






Search winscp.net

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

About donations

Associations

Kyplex Cloud Security Seal - Click for Verification

Site design by Black Gate

WinSCP Privacy Policy

WinSCP License