Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

TimU

Re: order of uploading files

@clt: You could either:

  1. Script it externally then call WinSCP with a known list of files to transfer.
  2. 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%)
clt

Order of uploading files

Hi @Martin, or anybody..
Is it possible to control the order of files uploading on the server? I have .gpg and .chk files and WinSCP upload .chk first (I assume that in alphabetical order). I need to upload e.g. first.gpg, then first.chk, second.gpg then second.chk etc. Thank you!
gnanasundram

Re: Winscp- want ot upload multiple files

martin wrote:

3.7.1 does not support file masks in scripting commands. Please upgrade to the latest version.

Hi,
Thanks for your response,
I have installed WinSCP (version 4.3.3) in my machine.
The script is working fine.
But while sending file it show an error stating that "Ignore permission errors" while sending the file.
please guide me how to correct the error.

Thanks and regards,
Gnana sundram.
martin

Re: Winscp- want ot upload multiple files

3.7.1 does not support file masks in scripting commands. Please upgrade to the latest version.
Guest

Hi,
Thanks for sample script, but I am getting the same error.
I followed the same step which you have given. But I am getting the below error
winscp>put *.CSV

*.csv    0kb  0.0kb/s binary 0%
file or folder '*.csv' does not exit