rm works on command lin but not in script!
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
# Connect
open scp://root:stiff14tree@192.168.0.184:22/www/verwarming
# Download file to the local directory
get -delete *.txt c:\Users\Erich\MCVLogs\DataTemp\
rm *.txt
# Disconnect
close
# Exit WinSCP
exit
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
# Connect
open scp://root:stiff14tree@192.168.0.184:22/www/verwarming
# Download file to the local directory
get -delete *.txt c:\Users\Erich\MCVLogs\DataTemp\
rm *.txt
# Disconnect
close
# Exit WinSCP
exit