You are on page 1of 9

Watch 4 Folder v2.

3 User Guide

Table of Contents

Introduction
Installation
Selecting a folder to monitor
Monitoring Events
Actions
Execute a Program
Using Arguments
Write to Log
Popups and alerts
Start Monitoring
Configuration files
Live Log
Command line options
OS Support
License
Contact
Introduction
Watch 4 Folder v2.3
Freeware by LeeLu Soft 2011

Watch 4 Folder is a simple and powerful monitoring tool to monitor folders and files activities.
It is a small, portable and simple to use utility.


Installation
Watch 4 Folder is a portable application, there is no install process, just unzip the file to any folder
and run it.





Selecting a Folder to Monitor
Select from the top shell view the folder or the device you want to monitor, if you want to monitor
sub folders also, check the "Watch sub folders" checkbox.


Monitoring Events
Select the monitoring events you want to monitor, the available monitoring events are:
- File create
- File Delete
- File Change
- File Rename
- Association Change
- Free Space change
- Folder Create
- Folder Delete
- Folder Rename
- Folder Change
- Media Insert
- Media Remove

**************************************************
Notice, a single event can create several Monitoring events, for example selecting File Change
event and File Rename event will create two events in case of file rename, because the file was
renamed but also changed.
So it is better to select specific events or general event but not both.
Also, Different versions of Windows operating systems behave in different ways with the
ShellNotify Windows API, so you will likely need in some situations to try a few combinations of
monitoring events until you will get the desired results.
Same thing for network folders, different Windows versions behave in different ways.
**************************************************

Actions
Select the actions on event, this is an optional step, here you can select the actions to take in
case of an event trigger.


Execute a program
Execute a program or batch file when event occurs, you should browse and select or enter the full
path to the executable or batch file.
Supported executable formats are:
.*exe
.*bat
.*vbs
.*cmd
To use the execute feature check the Execute a program or batch file checkbox.
Enter or browse and select the program to execute.



Using Arguments
With arguments you can return the changed object name as argument to the executed program.
For example if a file was changed you can trigger notepad to auto open the changed file.
Notice: Arguments represent the full path of the changed object warped with double
quotation, example: "c:\MyFolder\MyFile.ext"
Add changed object as argument ,can be activated only if execute a program is selected, this
option will enable sending the changed object name (file, folder, etc.) as an argument to the
executed program, batch or script, checking this checkbox will also enable the available
arguments dropdown list.
The Arguments dropdown list, from here you can select the returned argument to the executed
program, you can select only one kind of an argument at a time for one specific monitoring event.
The next picture shows the File Change event selected and the return argument is FileName (the
changed file name).

**************************************************
A Simple example of using arguments, in this example we will add a text file to a monitored folder
and set the filename as an argument for notepad so it will open the text file when triggered:
1. Select a folder to monitor.
2. Check the file create checkbox
3. Check the execute a program or batch file checkbox
4. At the edit box type :notepad
5. Check the Add change object as argument
6. Open the combo box and check file create - FileName
7. Start the monitor by clicking on Start Monitor button.
8. Copy from any folder any text file, paste the file into the monitored folder, this will trigger
notepad to open with the new created text file.
***************************************************

Some alerts can create two arguments for example renaming a file can return two arguments the
old name and the new name, select from the drop down list the desired arguments.
For the rename example you can select to return new name and old name, only new name or
only old name.
Check the following example:

***************************************************
A more advanced example using a batch file, in this example we will monitor a folder for file
rename, if the file was renamed WF4 will execute a batch file that will rename the file back to it's
original name:
Inside the folder you want to monitor create a batch file, let's call it run.bat.
Inside the batch file put one line: copy %1 %2 and save it.
1. Open W4F.
2. Select the folder you want to monitor.
3. Check File rename from Events to Monitor.
4. Check Execute a program or a batch file.
5. Enter full path to or browse and select run.bat that we have created at step 1.
6. Check Add changed object as argument
7. From the arguments dropdown list select and check: File Rename NewFile OldFile
(this option returns two arguments the new file name and the old file name).
8. Now Start Monitoring
9. Open the monitored folder and rename any file inside it, W4F will trigger the batch
(run.bat) and will create another copy of the renamed file with the original file name.
***************************************************

Log File
Write to a log file will automatically write a line to the log file when event occurs
Check the Write to log file checkbox ,now you can browse and create or enter the full path and
file name for the log file.
If the file doesn't exists it will be created, if the file exists the new lines will append to the end of
the existing file, the log file is in a text format (*.txt).

************************************************************************************
Notice: Do not save the log file inside the folder you are going to monitor !
************************************************************************************

If you didn't select to write to a log file and you still want to save the log, just select all the text
from the Live Log window, copy and paste to where you want.



Popups and Alerts
Check the Popup a message checkbox to pop up a message to the desktop when event occurs,
the popup will stay until OK button is pressed.
Check the Desktop alert checkbox to pop up a desktop alert (same as MS Outlook) when event
occurs, this popup will fade after a few seconds.



Starting the Monitor
Start Monitoring - use this button to start the monitoring, to Stop monitoring click on the same
button.

Using Configuration Files
You can save the monitoring configuration to use the same monitoring settings again, in fact you
can save as many configuration files as you want.
After you set your monitoring configuration With W4F, click on " Save ,"and save the configuration
file with a name you want, it is a standard Windows ini file.
To Load a Configuration file you have a few options:
The simple one is to click "Load" and select one of your saved configuration files, it will load all
the parameters.
You can also drag and drop the configuration file anywhere on the W4F form, it will load all the
configuration parameters.
Configuration file can be used also directly from the command line

Live Log
Selecting the Live Log tab will enable you to watch the monitoring live log while running.



W4F displays the events with different color for each type of event:
Blue = Setting changes
Green = Stop / Start monitoring
Red = Events / actions

If you didn't select to write to a log file and you still want to save the log, just select all the text
from the Live Log window, copy and paste to where you want.





Command Line Options
W4F can be executed directly from the command line:

You can run W4F from the command line using a saved monitor configuration file:
W4F23.exe c : \ FolderName\confName.ini (replace with your path and file name)
W4F23 will start with the monitoring settings from the ConfName.ini file.

***************************************************
Notice:
You must enter the absolute path to the ini file even if it is inside the same folder as W4F.
If the path to the configuration files, includes spaces it must be warped with " " , for example:
W4F21.exe "c : \ My Folder\ConfName.ini"
***************************************************

Using Command Line Parameters:
W4F can be executed from the command line with parameters:
/s for auto start
/ m to start minimized

Run from the command line, load settings from ConfName.ini, auto executes the monitor and
minimize to tray, example:
W4F21.exe "c : \ My Folder\ConfName.ini" /s /m
This will load the configuration and auto start the monitor and after a second will minimized it to
the system tray.

***************************************************
You can't use /m without /s before.
You can use only /s or none
***************************************************

OS Support
Watch 4 Folder 2.23 was developed on Windows 7 Professional, it was also tested on Windows
XP Professional but should run on other Desktop and Server windows based OS.
Notice: in some cases the ShellNotify Windows API acts differently on different OS
versions.

LeeLu Soft Freeware License
Copyright 8002 by LeeLu Soft <zvika.israeli@gmail.com>. All rights reserved

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

Contact:
zvika.israeli@gmail.com
http://leelusoft.blogspot.com

You might also like