Useful Scripts - WinSCP
winscp.net › eng › docsUseful Scripts. Uploading a single file. Upload to multiple servers / Parametrized script. Downloading file to timestamped-filename. Downloading the most recent file. Uploading the most recent file. Checking file existence. Moving local files to different location after successful upload. Locking files while uploading / Upload to temporary file ...
Move Remote Files Via Batch/Script :: Support Forum - WinSCP
winscp.net › forum › viewtopicNov 26, 2018 · Move Remote Files Via Batch/Script. 2018-11-26 20:45. One of our FTP partners dumps .txt and .xlsx files to a root directory; when we have finished grabbing the files they have dumped, we move them to an Archive directory under root. Currently we do all this in the WinSCP GUI, but I would like to automate this process, and I have got it to where I can pull the files without trouble using a batch file and Task Scheduler, but I have a problem:
mv command - WinSCP
https://winscp.net/eng/docs/scriptcommand_mvmv command Moves or renames one or more remote files. Syntax Remarks Examples Converting to .NET Assembly Syntax mv <file> [ <file2> ... ] [ <directory>/ ] [ <newname> ] Remarks Destination directory or newname or both must be specified. Destination directory must end with slash. Operation mask can be used instead of new name.
Useful Scripts - WinSCP
https://winscp.net/eng/docs/scriptsUseful Scripts. Uploading a single file. Upload to multiple servers / Parametrized script. Downloading file to timestamped-filename. Downloading the most recent file. Uploading the most recent file. Checking file existence. Moving local files to different location after successful upload. Locking files while uploading / Upload to temporary file ...
Moving local files to different location after ... - WinSCP
winscp.net › eng › docsWinSCP scripting does not support move command for local files. Instead you can combine WinSCP script with batch file: # Connect open mysession # Upload the files put *.*. # Exit WinSCP exit. Launch the above script from batch file like the one below: winscp.com /script =example.txt if %ERRORLEVEL% neq 0 goto error echo Upload succeeded, moving local files move *.* c:\backup\ exit /b 0 :error echo Upload failed, keeping local files exit /b 1.