Re: order of uploading files
@clt: You could either:
Here's an extract of a Windows Batch script that will append file names to an existing SFTP Batch Script
- Script it externally then call WinSCP with a known list of files to transfer.
- Run multiple WinSCP passes over your source directory, first transferring
*.gpg
, then*.chk
.
Here's an extract of a Windows Batch script that will append file names to an existing SFTP Batch Script
DIR /a-d /b *.gpd %source.path% >%SFTP.batch.filelist%
DIR /a-d /b *.chk %source.path% >>%SFTP.batch.filelist%
:: If there are no files in the source directory to transfer, leave the script.
if errorlevel==1 (@ECHO Nothing To Do - Exiting Script)&(Goto :EOF)
@ECHO File Listing Complete
:: Now echo the file names to the script, including the SFTP.OPERATION we want to perform.
@ECHO Echo the file names to the SFTP Script file
for /f "tokens=*" %%A in (%SFTP.batch.filelist%) do (echo PUT -preservetime "%%A" >>%SFTP.batch.script%)