User Tools

Site Tools


sift:directory_watchers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sift:directory_watchers [2025/02/06 16:26] sgrangersift:directory_watchers [2025/02/06 16:49] (current) sgranger
Line 5: Line 5:
 Watchers are stored as a XML file within you PCs AppData folder, it is possible to create, remove, and edit these files directly as long as the formatting is maintained. This can even be done through external scripting tools allowing you to even automate the process of creating and editing watchers. Watchers are stored as a XML file within you PCs AppData folder, it is possible to create, remove, and edit these files directly as long as the formatting is maintained. This can even be done through external scripting tools allowing you to even automate the process of creating and editing watchers.
  
-"C:\Users\UserName\AppData\Roaming\HAS-Motion, Inc\Sift\watchers" +"C:\Users\UserName\AppData\Roaming\HAS-Motion, Inc\Sift\watchers" \\ 
-[pic]+{{sift_watcher_xml.png}} \\
  
  
-the AppData folder is hidden by default on most windows systems and can be found file explorer can be set to show hidden files by acessing view on the top toolbar and selecting show -> hidden items +the AppData folder is hidden by default on most windows systems file explorer can be set to show hidden files by accessing **View** on the top toolbar and selecting **Show -> Hidden items** \\ 
- +{{windows_hidden_items.png}} \\
-[pic]+
  
 ===== Creating, Editing, and Deleting Watchers ===== ===== Creating, Editing, and Deleting Watchers =====
-In addition to interacting with the files directly Watchers controlled through the following commands on the Sift command line:+In addition to interacting with the files directlyWatchers can be controlled through the following commands on the Sift command line:
  
 ---- ----
Line 26: Line 25:
 This is the directory that will be watched, this can be passed more than once to watch multiple directories \\ This is the directory that will be watched, this can be passed more than once to watch multiple directories \\
 == Script (Required) == == Script (Required) ==
-This is a script to be executed upon triggering the watcher, the script can be a .v3s pipeline or a .bat script in the case of a .bat script the first line of the script must be ##SIFT (This ensures only scripts fully intended for sift are executed), the script command can be passed multiple times to execute multiple scripts, the scripts will be executed in the order they are passed. \\+This is a script to be executed upon triggering the watcher, the script can be a .v3s pipeline or a .bat script in the case of a .bat script the first line of the script must be ::SIFT (This ensures only scripts fully intended for sift are executed), the script command can be passed multiple times to execute multiple scripts, the scripts will be executed in the order they are passed. \\
 == Recursive == == Recursive ==
 If this is passed all sub-directories within a watched directory will also be watched. \\ If this is passed all sub-directories within a watched directory will also be watched. \\
Line 41: Line 40:
 ---- ----
 This command will list all watchers and their parameters This command will list all watchers and their parameters
-[pic] 
  
 ---- ----
Line 80: Line 78:
 once sift is running in the background you can interact with it via the system tray icon once sift is running in the background you can interact with it via the system tray icon
  
-[pic] \\+{{sift_tray.png}} \\
 from here you can \\ from here you can \\
-  * open gui - this will open a standard instance of sift with a GUI +  * **Open GUI** - this will open a standard instance of sift with a GUI 
-  * open console - this will open a console instance of sift, only one console instance of sift can run at a time +  * **Open Console** - this will open a console instance of sift, only one console instance of sift can run at a time 
-  * quit - this will close the background instance of sift, all other instances will remain open  +  * **Quit** - this will close the background instance of sift, all other instances will remain open  
-  * Disable start in tray - If you have sift set to launch in the background by default, this will disable it +  * **Disable Start in Tray** - If you have sift set to launch in the background by default, this will disable it 
-  * Watchers - if you have any active watchers they will be found here, within this list you can enable or disable individual watchers or enable or disable all watchers+  * **Watchers** - if you have any active watchers they will be found here, within this list you can enable or disable individual watchers or enable or disable all watchers 
 +{{sift_tray_watchers.png}} \\
  
 when a watcher is triggered all v3d pipelines will be run in the background, however all .bat scripts will open a command line interface, if you are running sift commands a command line instance of sift will open, this will not work if you already have sift open on the console, or if a script is triggered while another is still be processed. when a watcher is triggered all v3d pipelines will be run in the background, however all .bat scripts will open a command line interface, if you are running sift commands a command line instance of sift will open, this will not work if you already have sift open on the console, or if a script is triggered while another is still be processed.
  
-[batch example]+==== BATCH Files ==== 
 +Any .bat file can be executed via Directory Watchers, as long as the first line of the file is a BATCH comment containing SIFT (::SIFT) in order to run Sift commands via directory watchers you must first call Sift and pass it the desired commands 
 + 
 +=== Example === 
 +<code> 
 +::SIFT 
 + 
 +"C:\Program Files\Sift\Sift.exe" -LoadLib "C:\Input_Data" -LoadQuery "C:\Input_Data\Query.q3d" -SaveProject "C:\Input_Data\Sift_Queried_Data.i3d" -Exit 
 +</code> 
 + 
 +Windows BATCH scripting is a powerful tool and much more logic can be put into them, see the [[sift:tutorials:command_line|Batch Processing Tutorial]] For a slightly more complex example, for a step by step guide on creating and using Directory Watchers see the [[sift:tutorials:using_directory_watchers|Using Directory Watchers Tutorial]]
  
  
  
sift/directory_watchers.1738859180.txt.gz · Last modified: 2025/02/06 16:26 by sgranger