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 date time problem

Tommy G wrote:

You are right, it is the space that is throwing things off. So you just just need to put the whole file mask in quotes, and it will work.

So assuming you're using C#...
transferOptions.FileMask = "\"*.xml<=" + strTimeMask + "\"";

Which translates to...
"*.xml<=2015-02-04 03:27:11" as your mask

No, the quotes may not be there, they actually break the mask.

This is the correct code:
transferOptions.FileMask"*.xml<=" + strTimeMask;


If you have a different experience, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Tommy G

Re: Filemask date time problem

richtrot wrote:

When I use the file mask with a date and time nothing transfers

my file mask is as follows
transferOptions.FileMask = "*.xml<=" + strTimeMask ;

when the above translates to *.xml<=2015-02-04 all files < or = are transferred.

when the above translates to *.xml<=2015-02-04 03:27:11 nothing is transferred.

I think it has something to do with the space between the time and date but do not know how to resolve this problem.

thanks for any help


You are right, it is the space that is throwing things off. So you just just need to put the whole file mask in quotes, and it will work.

So assuming you're using C#...
 transferOptions.FileMask =  "\"*.xml<=" + strTimeMask + "\"";

Which translates to...
"*.xml<=2015-02-04 03:27:11" as your mask
martin

Re: File Masking

Bharath1988 wrote:

I am not able to use file masking in winscp 5.9.6

You have to tell us more. And show us your code.
Bharath1988

File Masking

I am not able to use file masking in winscp 5.9.6, may i know the reason.
Which version of winscp will support file masking.
martin

Re: Filemask date time problem

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
richtrot

Filemask date time problem

When I use the file mask with a date and time nothing transfers

my file mask is as follows
transferOptions.FileMask = "*.xml<=" + strTimeMask ;

when the above translates to *.xml<=2015-02-04 all files < or = are transferred.

when the above translates to *.xml<=2015-02-04 03:27:11 nothing is transferred.

I think it has something to do with the space between the time and date but do not know how to resolve this problem.

thanks for any help