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

martin

Re: Uploading multiple filet types using a script

"put -filemask=""*.html; *.svg"" * /public_html/my-remote-dir/" ^
SirClickalot

Uploading multiple filet types using a script

I have been using a script for while that enables me to upload multiple .html files from a named directory while simultaneously recursing through any subdirectories and doing the same. All good!

Here is the meat of the script (slightly redacted) ...
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /command ^
    "open ftp://USER:PASSWORD@IP_ADDRESS/ -rawsettings CacheDirectories=0 CacheDirectoryChanges=0" ^
    "put -filemask=*.html * /public_html/my-remote-dir/" ^
    "exit"

The key part that I am struggling to get working is the -filemask bit.

I wish to upload any SVG files too and I read the docs and I have tried adding...
"put -filemask=*.html; *.svg * /public_html/my-remote-dir/" ^

...but no SVGs are uploaded.

Can anyone please advise here?

Thanks