|
Running external applications |
|
|
< Back | Help index | Next >
The Run application command allows placing optional parameters in the corresponding field; thus, you can specify command-line parameters for the application to be run when the alert goes off. For example, you can specify a text file for your notepad, as shown above.
However, the real power of Folder Size Monitor unveils you use environment variables with your external applications.
First and foremost, the program understands the %currentdir% variable. What good can you get from it? Here is an example.
Suppose you want to launch some CD/DVD burner when the alert goes off. Thus, the command line you will enter in the Run application action will be something like this:
c:\program files\myburner\cddvdburner.exe
But how does Your-Cool-CD-Recoder know, which folder should it put on CD? The CD burner’s user manual says you would need to run it with the parameters
-burn [source folder] -silent
to have your files burnt on CD with no questions asked. So, you just need to give the program the name of the folder that triggered the alert. Therefore, your optional parameters line will change to:
-burn "%currentdir%" -silent
You can also use environment variables to specify Windows standard folders. For example, to launch Notepad, you can enter:
%windir%\explorer.exe
Instead of:
c:\windows\explorer.exe
This way, even if you move Folder Size Monitor’s configuration files to another computer with totally different location of standard folders (e.g., z:\MyWindows\), the program will work just as fine as if it was running on its “home” computer.
If you need to specify a temporary folder, you can use the environment variable %temp%.
For more information on this, please refer to Windows Help.
If you are a guru writing your own programs that create their own environment variables, you can also use those variables in Folder Size Monitor. For example, having defined the variable %MyDataPath%, you can specify it in the task to be run and then manage its value.
Note: Variables that could not be found are simply ignored.
< Back | Help index | Next >
|
|