Moving local files to different location after successful upload

WinSCP does not support move command for local files. Instead you can combine WinSCP script with batch file:

option batch abort
option confirm off
# Connect
open mysession
# Upload the files
put *.*

Launch the above script from batch file like the one below:

winscp.com /script=example.txt
if errorlevel 1 goto error

echo Upload succeeded, moving local files
move *.* c:\backup\
exit

:error
echo Upload failed, keeping local files

Further Reading

Advertisements:
 
  scripts.txt · Last modified: 16 Aug 2011 by prikryl
 

Search Documentation

This page

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

Associations

Kyplex Cloud Security Seal - Click for Verification

Site design by Black Gate