problem with filemask

Advertisement

asdad
Joined:
Posts:
2

problem with filemask

Hi

I'm trying to use command line winscp to copy a folder to a server, excluding svn files.
@echo off
set winscp="c:\Program Files (x86)\winscp\winscp.exe" 

...

%winscp% mysite /console /command "option confirm off" "put -filemask=.svn %localfolder% %remotefolder% " "exit"    
No matter what I set the filemask to, no files get uploaded (things work fine without the filemask, so never mind the tokens).

Ideally, I would like to exclude everything beginning with "." - I tried .* as filemask, is that right?


I also tried
%winscp% mysite  /console /command "option confirm off" "option exclude .svn" "put %localfolder% %remotefolder% " "exit"    
it seems to recognize the option - console prints "confirm off, include |.svn"
So exclude turns to include and again nothing gets uploaded

Using latest version 5.0.7 (build 2268)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: problem with filemask

Correct file mask is |.svn/


%winscp% /console /command "option confirm off" "option batch on" "open mysite" "put -filemask=|.svn/ %localfolder% %remotefolder% " "exit"

Reply with quote

asdad
Joined:
Posts:
2

Hi

Thanks for the reply
However, still doesnt seem to be working. Tried adding the filemask to both your and my version of the command, but it still ignores ALL files as soon as I do so.
Last lines of console (when I remove the exit command):
Session started.
Active session [1] xxx
winscp>    
Both versions work fine without filemask.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Please post a complete batch file you use to run WinSCP.
_________________
Martin Prikryl

Reply with quote

jadiagaurang
Joined:
Posts:
4
Location:
Los Angeles, CA

Unknown switch 'filemask'.

I have same requirements. I want to ignore .svn directories from my local directory to remote directory.

Here is my deploy script. Let me know what I am missing here.

option batch abort
option confirm off

open ftp://%3%:%4%@%2%

put -filemask=|.svn/ %1%\*

exit    

But, It gives me error saying that Unknown switch 'filemask'.

Thanks,
Gaurang

Reply with quote

GuestIV
Guest

Filemask switch only works in the version 5 beta. Use quotation marks.



Try:
put -include="* |.svn/ %1%\*"

Not tested so it might need some changing.

Reply with quote

Advertisement

You can post new topics in this forum