Tool

Imagen de bkeadle
tool
Reads:

%count lecturas

Score:
0
0
 
Comments:

0

DirMon

Author Info

6 April 2005 - 6:26pm
Submitted by: bkeadle

(View Disclaimer)

license: 
Free

By Bryan Keadle

We have a cOOl solution using iFolder to synchronize files between our wireless police vehicles and our municipal network.

As a matter of procedure, our beat officers save report files to a particular folder where the Watch Commander can review them. I wanted to provide a visual indicator showing the number of files that exist in this report directory so that the Watch Commander didn't have to manually browse to the directory to check for files. With DirMon, it will poll the named directory every 10 seconds (or whatever poll cycle I define), and change the system tray icon to show the number of files that exist in that directory.

When the monitored directory is empty, this icon exists in the system tray:

900-0.gif

As files get added to the directory, the system try icon will show the number of files in the directory:

900-1.gif

DirMon will only indicate up to 50 files:

900-2.gif

anything over that will simply show greater than 50:

900-3.gif

Of course, DirMon could be used for any need to monitor the number of files in a directory. For example, say you have some process(es) that generates logs to some central location. Furthermore, say that you have .LOG files and .ERR files in this directory, .ERR files are the error logs that you want to "watch" for. Simply add DirMon to your startup and point it to your logging directory, like this:

DirMon X:\LOGS\*.ERR 60

Every 60 seconds, DirMon will check for the number of .ERR files in your X:\LOGS directory, and update the system tray icon to indicate the number of those file.

Could be handy!

SYNTAX: DirMon (DIR) (POLL) (STOP)

DIR - Directory to monitor: you may specify a file specification EG: X:\iFolder\Queue or X:\iFolder\Queue\*.CSV

POLL - (Optional) Specify the number of seconds to poll the directory default=10

STOP - Terminate DirMon
AdjuntoTamaño
dirmon.zip399.89 KB

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell