WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Bug Reports >> Filter out files without spaces
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1203970361

Message started by andrewb on Feb 25th, 2008 at 9:12pm

Title: Filter out files without spaces
Post by andrewb on Feb 25th, 2008 at 9:12pm
I'm trying to set up a filter to ignore files with a space in the main part of the file.  I've tried a couple different methods that look good in the dialog and check out on test filenames with spaces in them but once I click ok to finish setting up the task the space disappears and the filter stops doing the job.  Is there some way of properly specifying a space in the filter value?

Thank you.

Title: Re: Filter out files without spaces
Post by Gert on Feb 26th, 2008 at 7:13am
Andrew,

Your current filter is probably something like "File Title contains ' '"? I think you are correct, the dialog will not properly write out the single space.
Can you try this instead: "File Title matches '* *'"? That should have the desired effect.

Gert

Title: Re: Filter out files without spaces
Post by andrewb on Feb 26th, 2008 at 5:45pm
Gert,

What you've suggested makes perfect sense.  However, in practice the "Filter Title contains '* *', file is NOT processed" tested on a filename with a space in it (such as "one more.txt") in the Test Files field does not generate a true result and the files are still processed.  If I enter in a file named "* *.txt" then it comes back as true.  Is it safe to assume that if it's not doing what I want in the Test Files field that it won't work in normal operation?

Title: Re: Filter out files without spaces
Post by Gert on Feb 27th, 2008 at 5:47am
Please make sure to use matches, not contains. That should make it work.

Matches treats the * in a special way (matching zero or more characters - a wildcard).
Contains doesn't do this special treatment for *.

Gert

Title: Re: Filter out files without spaces
Post by andrewb on Feb 27th, 2008 at 4:35pm
Ahh, that's what I was doing wrong.  I set it up with matches instead of contains (sorry, I should have noticed that it says "matches wildcards" right in the filter setup) and it works exactly as you described.  

Thank you very much for your help.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.