WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
New PLUGIN IDEA maybe already have it. (Read 4877 times)
pir8radio
YaBB Newbies
*
Offline



Posts: 1
New PLUGIN IDEA maybe already have it.
Oct 31st, 2005 at 3:05am
 
All i want to do is create either HTML or .txt  file that shows only file names of changed files...  I run a file server site and would love for users to be able to see what has been added to the server.  All automatic would be cool..      so the list of files gets put in plain text on to an html template? and gets dropped into annother directory..  easy money right?

thanks guys
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2232
The Netherlands
Re: New PLUGIN IDEA maybe already have it.
Reply #1 - Oct 31st, 2005 at 5:50am
 
I may have a solution for this, I need to do some more testing.
I will post it later today.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2232
The Netherlands
Re: New PLUGIN IDEA maybe already have it.
Reply #2 - Oct 31st, 2005 at 4:52pm
 
Ok...

Please download this archive
It contains the following files:
header.txt
  enter the html you want to show before the "latest files" listing
footer.txt
  enter the html you want to show after the listing
sqlite3.exe
  this is a command line sql processor for the SQLite database that is used by watchDirectory to store history info.
latestfiles.bat
  the .bat file you use to monitor your directory.
  You will need to change this script to set the location of the headert.txt and footer.txt (where you unzipped the archive)

Use the automatically start a .bat file plugin to start the latestfiles.bat
Configure it to only start for New Files and give it a try.

Let me know if this works ok.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
TonyF
YaBB Newbies
*
Offline



Posts: 37
Re: New PLUGIN IDEA maybe already have it.
Reply #3 - Sep 18th, 2014 at 4:05pm
 
Hi Gert,

This solution is really useful and I have tried it out with great success. I added the id, code and filenameori fields to your SQL query as I find this additional information useful. One thing I noticed with your original batch file was that the HTML report reported information of the last but one event (i.e. not the last change just made). I finally realized that the SQL in the batch file was reading the history file before the latest event information could be written to it. I therefore added a 'Sleep 5' statement to the batch file to pause the script for 5 seconds before the SQL query was run. This fixed the issue and now the HTML report reports the latest event. Can you think of a more elegant way of making the batch script wait till the event(s) has been written to the history file? Thanks for all you hard work in extending the capabilities of a very powerful utility. Best regards, Tony.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2232
The Netherlands
Re: New PLUGIN IDEA maybe already have it.
Reply #4 - Sep 19th, 2014 at 5:16pm
 
Hello Tony,

I guess at the moment you let your task trigger for NEW FILES (the FILENEW option). Keep that option selected, but also select the QUIET option and "only one QUIET event". Set the QUIET interval to something like 10 seconds.

This will trigger the script for every new file and also trigger the script 10 seconds after the last new file is detected.

Now add the following code at the top of the bat script
Code:
REM ignore all events except QUIET
IF "%WD_REASON%" NEQ "QUIET" GOTO :EOF
 



The FILENEW event will be ignored by the script, but should still be selected in the task's settings.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1