Macro > Triggers >

www.MacroToolworks.com

Folder

 

This trigger type allows to start macro when a folder content changes.

 

Folder event

New file in the folder is created

A file in the folder is deleted

A file in the folder is changed

New sub-folder is created

A sub-folder is deleted

 

Matching Folder Content

Folder path such as: c:\folder\*.txt causes that if a text file in "c:\folder" folder is created, deleted or modified then the macro is started. If this is not full path (just *.txt) then path relative to the macro file location is considered. File path can contain Windows environment variables (for example:  %TEMP%\*.txt) or Macro Toolworks application global variables (just simple, no array)  - for example: c:\%ga_Folder%\*.txt.

 

Save result files/folders to variable

This field contains the name of the variable (array) that receives list of files/sub-folders that matched the criteria and caused the macro to start. This variable can be used in the macro to manipulate the files/sub-folders (such as copy them, delete, etc.).

 

Save number of result files/folders to variable

This field contains the name of the variable that receives the number of files/sub-folders.