Hi,
Does anyone know whether there is a filename varibale for the windows filewatcher that we can set, to use for the next job?
For example, the AFT module has the option to use autoedit variable for the detected filename.
But, for Windows, I don't see that option.
Thanks.
regards
Sharon
Filewatcher in Windows panel vs Filewatcher for AFT panel
- nicolas_mulot
- Nouveau
- Posts: 149
- Joined: 07 Jan 2010 12:00
Sharonc,
The filewatcher tab you can use to define a filewatcher job is designed to run a single_action filewatcher against a single (exact or generic) file name.
If you want to retrieve the file name, you must use a filewatcher rule, then run the file watcher using the following format:
ctmfw -input <rule_name>
In that case, the actual file name is accessible within the rule in the %FILENAME% variable.
You can then, as part of the rule, set a global autoedit variable, using a DO_CMD statement.
Example:
ON_FILEWATCH D:\IOALIBS\ctmecs\batch\file_watcher\MSbatch\testfile.txt* CREATE
THEN
DO_CMD ctmvar -action set -var "%%\CTMFW_FILENAME" -VAREXPR "%FILENAME%"
END_ON
I believe this syntax is valid for all platforms. It has been tested on Windows.
Cheers
The filewatcher tab you can use to define a filewatcher job is designed to run a single_action filewatcher against a single (exact or generic) file name.
If you want to retrieve the file name, you must use a filewatcher rule, then run the file watcher using the following format:
ctmfw -input <rule_name>
In that case, the actual file name is accessible within the rule in the %FILENAME% variable.
You can then, as part of the rule, set a global autoedit variable, using a DO_CMD statement.
Example:
ON_FILEWATCH D:\IOALIBS\ctmecs\batch\file_watcher\MSbatch\testfile.txt* CREATE
THEN
DO_CMD ctmvar -action set -var "%%\CTMFW_FILENAME" -VAREXPR "%FILENAME%"
END_ON
I believe this syntax is valid for all platforms. It has been tested on Windows.
Cheers