more than one filemask error

Advertisement

Nardog
Joined:
Posts:
3
Location:
Virginia

more than one filemask error

I am trying to put files in a remote directory non-recursively as well as be less than a day old.

Filemask:
transferOptions8.FileMask = "*>=1D;|*/";

Full Code Block:
session8.Open(sessionOptions8);
                    TransferOptions transferOptions8 = new TransferOptions();
                    transferOptions8.TransferMode = TransferMode.Binary;
                    transferOptions8.FileMask = "*>=1D;|*/";
                    TransferOperationResult transferResult8;
                    transferResult8 =
                        session8.PutFiles(@"C:\Transmissions\Inbound\*", @"/from/ss/", false, transferOptions8);
                    transferResult8.Check();

The `Inbound` folder has folders in it I do not want want to send.
The error I get when running this is:

C:\>.\Sync.exe
Error: WinSCP.SessionRemoteException: Mask is invalid near '=1D;|*'.
at WinSCP.OperationResultBase.Check()

Any thoughts?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
30,857
Location:
Prague, Czechia

Re: more than one filemask error

The semicolon should not be there.
It should be:
transferOptions8.FileMask = "*>=1D|*/";

While technically the semicolon should be ignored, it's not as there's a bug:
https://winscp.net/tracker/1745

Reply with quote

Advertisement

You can post new topics in this forum