Filemask and slashes

Advertisement

djhurt1
Joined:
Posts:
3

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
43,052
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum