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: Filemask and slashes

Both forward and backslash work in the file mask.
The backslash is not an escape character in WinSCP. Neither in Windows batch file.
So in a batch file
(.bat) like this, both should (and do) work:
set chclocal=C:\local\path
set chcremote=/remote/path/
winscp.com /ini=nul /log=script.log /command ^
    "open ..." ^
    "put -resumesupport=off -filemask=|*\ %chclocal%\*.* %chcremote%" ^
    "exit"

(tested now)

If you have a different experience, please post your batch file and session log file.
djhurt1

Filemask and slashes

Running batch script in Windows. Curious why -filemask=|*/ works but -filemask=|*\ doesn't. The latter appears, at least according to the log that it gobbles up the following space after the backslash acting like an escape character. Is the backslash a legit escape character in WinSCP? Trying to determine if it's CMD or WinSCP treating it this way.
"put -resumesupport=off -filemask=|*/ %chclocal%\*.* %chcremote%"

Admittedly the documentation does show to use */ but my dumb self didn't catch that right away.