Problem With Task Sceduler
Good Morning,
I'm new to Winscp Scripting, and i've got a problem with the automation of mi scripting.
My environment is simple i install an SSH server with Freesshd, and now i start to use winscp for transfer file on 22 Port in this server. If i use a script that i run with a .bat file manually with a double click than all work perfectly.
But if i use the Windows task scheduler, nonthing happens, i think it's simple because i start a program : mytransfer.bat and i click "esecute", but nothing...also if i wait the time for the schedule...
My script is run with a simple batch (mytransfer.bat)
@echo off
cd "C:\Program Files (x86)\WinSCP"
winscp.com /script=Upload.txt
exit
that lunch this simple file "Upload.txt":
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open sftp://user@xx.xx.xx.xxx/ -hostkey="ssh-rsa 2048 ##:##:##:ecc..."
# Force binary mode transfer
option transfer binary
# Upload the file to current working directory
put c:\Uploadfile\*.*
# Disconnect
close
# Exit WinSCP
exit
Thank a lot for the support
I'm new to Winscp Scripting, and i've got a problem with the automation of mi scripting.
My environment is simple i install an SSH server with Freesshd, and now i start to use winscp for transfer file on 22 Port in this server. If i use a script that i run with a .bat file manually with a double click than all work perfectly.
But if i use the Windows task scheduler, nonthing happens, i think it's simple because i start a program : mytransfer.bat and i click "esecute", but nothing...also if i wait the time for the schedule...
My script is run with a simple batch (mytransfer.bat)
@echo off
cd "C:\Program Files (x86)\WinSCP"
winscp.com /script=Upload.txt
exit
that lunch this simple file "Upload.txt":
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open sftp://user@xx.xx.xx.xxx/ -hostkey="ssh-rsa 2048 ##:##:##:ecc..."
# Force binary mode transfer
option transfer binary
# Upload the file to current working directory
put c:\Uploadfile\*.*
# Disconnect
close
# Exit WinSCP
exit
Thank a lot for the support