Topic "filemask for several file type; prbl. within command line"

Author Message
plubarj
[View user's profile]

Joined: 2012-10-04
Posts: 2
Location: WinSCP 4.3.9, Build 1817
Hello
I'm getting in trouble using filemask with the command line to download several file types.
e.g. with the command below returns an error: Missing parameter for cammand 'get'
Code:
winscp /command "option batch abort" "option confirm off" "open ftp:/myftp.com" "get -resume -preservetime -filemask="*.m4a; *.wav; *.dct; *.txt" /data/dictate/* c:\temp\" "exit"


But if I put just a single filetype like below, it works
Code:
winscp /command "option batch abort" "option confirm off" "open ftp:/myftp.com" "get -resume -preservetime -filemask=" *.txt" /data/dictate/* c:\temp\" "exit"


It's like the semi-column separator was not accepted. I tried many other options witout success. Would someone be able to help me?
Thanks in advance


***WinSCP 5.1.0, build 2625
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Code:
winscp /command "option batch abort" "option confirm off" "open ftp:/myftp.com" "get -resume -preservetime -filemask=""*.m4a; *.wav; *.dct; *.txt"" /data/dictate/* c:\temp\" "exit"

Note the double double-quotes.
See https://winscp.net/eng/docs/commandline#syntax
_________________
Martin Prikryl
plubarj
[View user's profile]

Joined: 2012-10-04
Posts: 2
Location: WinSCP 4.3.9, Build 1817
Yeah! Cool! It works so.
Thanks a lot prikryl.

Funny: in my code now, I've got quintuple quotes Mr. Green
Code:
... preservetime -filemask="""""& $fileType &""""" ...
Anna

Guest


can I please confirm if this syntax is supported in 4.3.9

synchronize remote -filemask="*.csv"


WinSCP.exe /command "option batch abort" "open Test" "cd Test01" "lcd \\out" "synchronize remote -filemask=""*.csv""" "exit" /log=C:\temp\log\test.log

thank you
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Anna wrote:
can I please confirm if this syntax is supported in 4.3.9

The -filemask switch was introduced in 5.0.6 only. For older versions use "option include". Or even better, upgrade.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License