473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

FileSystemWatcher.Filter

anyone know how to filter different file types ie .jpg .gif in
FileSystemWatcher.Filter?

Ian

--
"Life should NOT be a journey to the grave
with the intention of arriving safely in an
attractive and well preserved body,
but rather to skid in sideways,
chocolate in one hand, beer in the other,
body thoroughly used up,
totally worn out and screaming
WOO HOO what a ride!"
Nov 16 '05 #1
2 4724
I don't think you can. The filter is limited to one type although as you
probably know you can at least use wildcards.
You will have to leave the filter blank to include everything and test for
the file extension yourself in the fired event.

"Ian Frawley" <ch****@away.com> wrote in message
news:gI***************@news-1.opaltelecom.net...
anyone know how to filter different file types ie .jpg .gif in
FileSystemWatcher.Filter?

Ian

--
"Life should NOT be a journey to the grave
with the intention of arriving safely in an
attractive and well preserved body,
but rather to skid in sideways,
chocolate in one hand, beer in the other,
body thoroughly used up,
totally worn out and screaming
WOO HOO what a ride!"

Nov 16 '05 #2
Damn I gathered that was the case. Never mind.
Thanks

Ian

"nevin" <ne***@myself.com> wrote in message
news:41*********************@mercury.nildram.net.. .
I don't think you can. The filter is limited to one type although as you
probably know you can at least use wildcards.
You will have to leave the filter blank to include everything and test for
the file extension yourself in the fired event.

"Ian Frawley" <ch****@away.com> wrote in message
news:gI***************@news-1.opaltelecom.net...
anyone know how to filter different file types ie .jpg .gif in
FileSystemWatcher.Filter?

Ian

--
"Life should NOT be a journey to the grave
with the intention of arriving safely in an
attractive and well preserved body,
but rather to skid in sideways,
chocolate in one hand, beer in the other,
body thoroughly used up,
totally worn out and screaming
WOO HOO what a ride!"


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ryan Rogers | last post by:
The FileSystemWatcher Class has a filter property where you can tell it what files you want it to watch for. I need it to watch for *.p** and *.f** files both and have tried giving the filter the...
1
by: Shmulik | last post by:
How can I (can I?) use a regular expression as the filter to a FileSystemWatcher? I want to watch for something like this: Regex regex = new Regex(@"^Current(One|Two|Three)File\.txt$",...
1
by: Troy Murphy | last post by:
How do I prevent the FileSystemWatcher event to keep firing while the file is being created? When copying a file to the watched folder, the event fires a dozen or more times! Also, the...
1
by: eyal | last post by:
Hi, I'm trying to do this: private void SetNF(FileSystemWatcher fsw,int val){ if( (val&4)!=0 ) fsw.NotifyFilter |= System.IO.NotifyFilters.Attributes; // i'v tried this also: // if(...
2
by: John Lee | last post by:
Hi, I wrote a small program that copy a list of files to a specified folder one by one, i.e. this app will copy one file into the specified folder and wait until it's consumed (deleted) then...
0
by: Eric Wong | last post by:
I am experiencing a bizarre problem using FileSystemWatcher... I have an application that uses multiple FileSystemWatcher to watch for particular files on a network drive. FSW_A uses a filter of...
7
by: Frank | last post by:
Hi, I am using FileSystemWatcher to track the change in a text file. Whenever I run the program I get 99% CPU utilization. The code doesn't do anything just sits and waits in a while loop until...
12
by: ljh | last post by:
Has anyone else noticed that the FileSystemWatcher raises the changed event twice when a file is changed? Do you have any idea why this is the case?
3
by: emailtonitin | last post by:
I am facing a design issue in my code related to the filesystemwatcher's filter property. I figured out that the filter won't accept multiple patterns for eg. "*.txt, *.csv" don't work. To...
5
by: Goran Djuranovic | last post by:
Hi all, I have a file system watcher service that works fine on a local hard drive, but will not work across the network. I tried both: mapping the drive and "\\..." path both no luck. I don't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.