Author Topic: Watcher Plugin, file filter question  (Read 1535 times)

0 Members and 1 Guest are viewing this topic.

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Watcher Plugin, file filter question
« on: June 24, 2015, 09:52:54 PM »
I'm using 2.148 with the new watcher plugin  :D (thanks again jitterjames)

I'm working on a new group of commands that will move video files and use a script from another program that will rename the video file and then move it to the proper location. with this group of commands I have it watch the final destination folders (Movies, TV Shows) and those folders also have- png, jpg, tbn... added to them as well,

so I'm trying to filter the watcher plugin to only look for video files like- mp4, avi, mkv, iso..... and so on,

I've tried these with no luck  :bonk
Quote
*."avi", "mp4", "iso"   

*.("avi", "mp4", "iso")

*".avi", ".mp4", ".iso"

*(".avi", ".mp4", ".iso")

is there a way to filter for multiple file extensions? or to exclude multiple extensions?
« Last Edit: June 25, 2015, 08:10:06 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Watcher Plugin, file filter questin
« Reply #1 on: June 24, 2015, 09:58:14 PM »
No it is simply not possible with the .Net FileSystemWatcher.  You would need to set up multiple watchers, or use *.*.

https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.filter.aspx

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 497
  • Karma: 43
    • View Profile
Re: Watcher Plugin, file filter questin
« Reply #2 on: June 25, 2015, 02:34:42 AM »
Thanks for the fast reply, I was a little busy running around trying to get everything turned off we had a nasty storm roll through and the power was flickering like crazy and we where with out power for about 2 hours,

but it gave me some time to think, I was thinking I would use some regex and a logic block if filtering wasn't possible

then after reading your post and some more thinking your option will be better sense I'm using Media Companion to download artwork and .nfo files when my command is done and that could cause hundreds of images and .nfo's to be downloaded depending on how much I added and that means it would have to check the file extension on every item then tell the command to stop over and over

it will make it a little less user friendly to setup but it will be worth it, I have some more testing to do on my group of commands, but hopefully I can get it uploaded tomorrow

 Thanks again for the awesome new watcher plugin  ::bow