- 
                Notifications
    You must be signed in to change notification settings 
- Fork 39
Placeholders
        TechieGuy12 edited this page Jul 5, 2024 
        ·
        4 revisions
      
    Placeholders can be used to have information replaced dynamically with different values. Below is a list of placeholders that can be used.
Specific functions for a watch that require specifying a path can make use of placeholders to provide dynamic file or folder locations. The valid placeholders are outlined in the table below.
| Placeholder | Description | 
|---|---|
| [exactpath] | The full path of the changed file, including the watch path. | 
| [fullpath] | The full path of the changed file, excluding the watch path. | 
| [path] | The path of the changed file without the watch path and the file. | 
| [file] | The name of the changed file with the extension. | 
| [filename] | The name of the changed file without the extension. | 
| [extension] | The extension of the changed file. | 
| [oldexactpath] | The original full path of the renamed file, including the watch path. | 
| [oldfullpath] | The original full path of the renamed file, excluding the watch path. | 
| [oldpath] | The original path of the renamed file without the watch path and the file. | 
| [oldfile] | The original name of the renamed file with the extension. | 
| [oldfilename] | The original name of the renamed file without the extension. | 
| [oldextension] | The original extension of the renamed file. | 
| [createddate:format] | The created date and time of the changed file. For format information please see Date Format | 
| [modifieddate:format] | The modified date and time of the changed file. For format information please see Date Format | 
| [currentdate:format] | The current system date and time. For format information please see Date Format | 
| [env:{name}] | Gets the value of the environment variable specified by {name}. | 
| [urlenc:{value}] | URL-encodes the string specified by {value}. | 
| [var:{name}] | (Version 2.x or higher.) Gets the value of a variable specified by {name}. The {name} is not case-sensitive. | 
For the file, C:\Temp\Documents\test.doc, with the watch path of C:\Temp, the value of the placeholders are as follows:
| Placeholder | Value | 
|---|---|
| [exactpath] | C:\Temp\Documents\test.doc | 
| [fullpath] | Documents\test.doc | 
| [path] | Documents | 
| [file] | test.doc | 
| [filename] | test | 
| [extension] | .doc | 
The following table shows the values for a source file, and a destination definition using the current date placeholder:
| Name | Value | 
|---|---|
| Source file | C:\Temp\Documents\test.doc | 
| Destination placeholder | C:\Temp2\[filename] ([currentdate:{yyyy-MM-dd}])[extension] | 
| Current date | February 5, 2022 | 
| Destination file | C:\Temp2\test (2022-02-05).doc |