Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

DirectoryWatcher2 and python

Questions and comments specific to a particular plugin should go here.
Post Reply
frezorer
Posts: 1
Joined: Mon Oct 10, 2011 11:02 pm

DirectoryWatcher2 and python

Post by frezorer »

Hi!
When an event from DirectoryWatcher is generated ie. update I can see that the path to file generating the event is in the event.

How can I get that information and use it in a python script?

So what I want to do is:
1.An update event is triggered
2. launch a python script which will use the path to the triggered file

Is there any particular documentation that you would point me to, to find these things out?

Thanks on beforehand

-Andreas :?:
kalia
Experienced User
Posts: 109
Joined: Wed Aug 12, 2009 1:10 am

Re: DirectoryWatcher2 and python

Post by kalia »

Use "eg.event.payload" to get the path.

Have you taken a look at http://www.eventghost.net/docs/scripting.html.
Flook
Posts: 20
Joined: Thu Mar 04, 2010 1:07 pm

Re: DirectoryWatcher2 and python

Post by Flook »

Been using directory watcher for years on some network folders and now after updating eventghost it does not work for the network paths. It works fine for a local folder just not a network path. Directory watcher says version 1.0. Is there a 2.0 and is so where can I find it? I've ran searches through the entire forums for it.

Example Path:\\HTPC\Torrent-Finished\TV
Has worked for years, now I get no events.

I also tried the path on a mapped network drive which I tried years ago and it never worked. Only the network path above ever worked but I thought I would give it a try.
Example Path:G:\Downloads\Torrent-Finished\TV (G: is a network drive)
This gives me no events as well.

Local C: drive path works just fine. Gets all the normal events.
C:\Test

Eventghost is running a a VM on Win7x86 and the path is to the host machine running Win7x64
Any help would be appreciated. Thanks.
Flook
Posts: 20
Joined: Thu Mar 04, 2010 1:07 pm

Re: DirectoryWatcher2 and python

Post by Flook »

Got it working again. No idea why but I had to redo the credentials to access the network path. Then, after restarting eventghost, it worked again. All is well.
Post Reply