Action tab

On the Action tab you specify what you want to happen when a file event occurs (a new file, update or delete).

Yes, you can have a different set of actions for different folders by running separate copies of FileWatcher. You can also perform different actions depending on the source folder by using a script.

External Command (exe, bat, vbs, js etc)

Here is where you specify the command to be run when the file(s) arrive.

This MUST be a .EXE, .COM or .BAT, .JS, .VBS filename or any other filename understood by Windows to be an executable filename. See the examples.

Test button

The test button allows you to check that your process is working. After clicking [Test], a new browse window is shown from which you can choose one or more files to 'arrive'. After clicking Ok, File Watcher will simulate the arrival of these new files in the Live Log.

Parameters

These are the parameters to send to the command. Ensure any filenames you specify that might contain spaces are double-quoted. See the Appendix for examples. A right-click context menu allows you to insert these values.

%FILE%

Inserts the full filename (and path), double-quotes must be entered by the usere.g. c:\new_files\file0001.txt
%FILEPATH%Inserts just the file path with a trailing slash, double-quotes must be entered by the usere.g. c:\new_files\
%FILENAME%Inserts just the filename (no path), double-quotes must be entered by the usere.g. file0001.txt

%NAME%

Inserts just the name (no path or extension), double-quotes must be entered by the usere.g. file0001
%EXT%Inserts just the file extension, with a leading periode.g. .txt
anyAny environment variable can also be insertede.g. USERNAME, ProgramData, PUBLIC, TEMP, COMPUTERNAME etc

 

If you need the filename both with and without the path, you could specify your parameters like this:

…my_batch_file.bat "%FILE%" "%NAME%"

And then within my_batch_file.bat, these will be available as %1 and %2 respectively.