You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -316,6 +317,42 @@ For example, the following set a menu visible only when the user right-click on
316
317
317
318
318
319
320
+
### pattern attribute: ###
321
+
322
+
The `pattern` attribute validates a menu based on a wildcard pattern matching algorithm. The wildcard pattern can include special characters such as `*` and `?` where
323
+
*`*` Matches any string of zero or more characters.
324
+
*`?` Matches any single character.
325
+
326
+
If `pattern` attribute is specified, the files selected by the user must match the wildcard pattern for the validation to be successful. To specify multiple patterns, one must separate each pattern value with the `;` character. If multiple patterns are specified, **at least one** pattern must match for the validation to be successful.
327
+
328
+
If multiple files are selected, the path of each file must match **at least one** pattern for the validation to be successful.
329
+
330
+
If `pattern` attribute is not specified, then the validation is successful.
331
+
332
+
For example, the following set a menu visible only when the user right-click on JPEG image files which filenames start by `IMG``:
|\\e\*.??? | Matches filenames beginning with the letter `e`. |
342
+
|\*e.??? | Matches filename ending with the letter `e`. |
343
+
|\*vacations\*| Matches files that have the word `vacations` in their path. |
344
+
|\*2019\*| Matches files that have the year 2019 in the filename or directory path. |
345
+
|\*\\DCIM\\\*| Matches the files located in a Digital Camera Images directory. |
346
+
| C:\Program Files\\\*;<br>C:\Program Files (x86)\\\*| Matches files that are located in `C:\Program Files` or `C:\Program Files (x86)` directories. |
347
+
| ${env.USERPROFILE}\\Downloads;<br>${env.USERPROFILE}\\Desktop | Matches files that are located in the user's `Downloads` or `Desktop` directories. |
348
+
| D:\\\*| Matches files located on the D: drive. |
349
+
|\*\\IMG_????.JPG;<br>\*\\DSC_????.JPG | Matches Canon or Nikon image files. |
350
+
351
+
**Note:**
352
+
The `pattern` attribute should not be used for matching files by file extension. The `fileextensions` attribute should be used instead.
353
+
354
+
355
+
319
356
### exists attribute: ###
320
357
321
358
The `exists` attribute validates a menu if the specified file or directory exists.
@@ -364,6 +401,7 @@ The meaning of each inversed attribute in explained in the following table:
364
401
| maxfiles | Defines a minimum number of selected files. Validates a menu if **more than**_x_ files are selected.<br>If 'maxfiles` is set to 5, _more than_ 5 files must be selected for the validation to be successful. |
365
402
| maxfolders | Defines a minimum number of selected folder. Validates a menu if **more than**_x_ folders are selected.<br>If 'maxfolders` is set to 3, _more than_ 3 directories must be selected for the validation to be successful. |
366
403
| fileextensions | Validates a menu if the given file's extension **does not** match the file extension selected by the user.<br>If multiple file extensions are specified, **no extension** must match the selected files for the validation to be successful. |
404
+
| pattern | Validates a menu if the selected file or directory **does not** match the wildcard pattern matching algorithm.<br>If multiple patterns are specified, **no pattern** must match the selected files for the validation to be successful. |
367
405
| exists | Validates a menu if the selected file or directory **does not** exists.<br>If multiple files/directories are specified, **all values** must _not exists_ on the system for the validation to be successful. |
368
406
| properties | Validates a menu if the specified property is **empty** or **not defined**.<br>If multiple properties are specified, **all properties** must be _empty_ or _not defined_ for the validation to be successful. |
0 commit comments