WinSCP putting multiple files on sftp site

Posted by NewToWinSCP on Super User See other posts from Super User or by NewToWinSCP
Published on 2011-09-22T21:20:10Z Indexed on 2014/06/12 15:29 UTC
Read the original article Hit count: 509

Filed under:
|

WinSCP 5.2 I wanted to put multiple files with a file extension .pgp on an sftp site. When I tested my original command line (see below) and it only placed the first *.pgp alphabetical file (D:\a.csv.pgp) on the sftp site. I tried specifying *.PGP and *.pgp without any changes - only one file (D:\a.csv.pgp) would be copied each time. I got it to work for all files only if I specified a put command for each .pgp file. Any ideas on how to put all *.pgp on the sftp site?

Original Command Line - Does Not Work
d:\winscp\winscp /command "option echo off" "option batch on" "option confirm off" "open sftp" "put D:\*.pgp" "close" "exit"

Works
d:\winscp\winscp /command "option echo off" "option batch on" "option confirm off" "open sftp" "put D:\a.csv.pgp" "put D:\b.csv.pgp" "put D:\c.csv.pgp" "put D:\d.csv.pgp" "put D:\e.csv.pgp" "put D:\f.csv.pgp" "put D:\g.csv.pgp" "put D:\h.csv.pgp" "put D:\i.csv.pgp" "close" "exit"

© Super User or respective owner

Related posts about winscp

Related posts about put