Posted: 2014-12-21 15:37
I am using this script to transfer a file and delete the source file.
The result is a perfect tranfer, but removing the source doen't work.
After checking the forum, I tryed using the latest version, checking the user (root) and the permissions, using "get -delete" al without succes.
Checking the log (attached) it seems as if after the succesfull transfer, winspc closes, discarting any statements after the "get". I tried adding a "echo" or even repeating the same "get" statement, they don't show in the log.
Executing "rm *txt" from the command line works perfect!
What am I missing? Thanks for helping!!
# USAGE: C:\Program Files (x86)\WinSCP>winscp.com /script=ScpScript2.txt
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Download file to the local directory
get -delete *.txt c:\Users\Erich\MCVLogs\DataTemp\
# Exit WinSCP
Location: Prague, Czechia
You are obviously executing a different script than the one you have posted.
> 2014-12-21 15:15:56.843 Script: option batch abort
> 2014-12-21 15:15:56.843 Script: option confirm off
> 2014-12-21 15:15:56.843 Script: open scp://root:***@192.168.0.184:22/www/verwarming
> 2014-12-21 15:15:59.673 Script: get *.txt c:\Users\Erich\MCVLogs\DataTemp\
> 2014-12-21 15:15:59.733 Script: close
Posted: 2014-12-23 10:07
So simple, yet so helpfull!
You can post new topics in this forum
And it's free!