setrevision
Description
The setrevision command allows you to set the PDM-managed revision of a file inside the vault.
This command updates the official PDM revision, which is the value shown on the Version tab, not a data card variable.
You may set the revision using:
%nextrevision%- moves the revision forward.%previousrevision%- moves the revision backward.%initial%- resets to the first revision in the revision scheme.
You can also use PDM variable expressions:
$(Revision.@)
This evaluates the variable on the file and applies its value as the new revision. For file variables, include the configuration suffix. Use .@ for the file @ tab.
Bracketed text is treated as literal text and is not evaluated.
Syntax
setrevision -filePath|-search -recursive -value -csv
Use -id as an alternative to -filePath for the same operand. A required target still needs one selector, even though each alternative is optional individually. See File IDs and paths for selection rules and command-specific exceptions.
Parameters
| Parameter | Alias | Required | Description |
|---|---|---|---|
-filePath |
No | Complete file path. Absolute or relative paths are allowed. | |
-search |
No | Search query used to find matching files in the current directory. | |
-recursive |
No | When used with search, includes matching files in subfolders. | |
-value |
No | Value to apply with this command. | |
-csv |
No | CSV file path used to read input or write command results. Include the .csv extension. | |
-id |
No | Positive PDM file ID instead of -filePath, identifying the same file that -filePath describes (including a macro, input CSV or existing output file). Requires a connected vault. Shared files with multiple locations require an exact -filePath. Resolving the ID itself does not download, check out or check in the file; the requested command still performs its normal operation. |
More about parameters
filePath
Path to the file whose revision you want to update. Only a single file is affected by this command.search
Search query in the current folder.recursive
When used withsearch, includes files in subfolders.value
The revision value to apply. This can be:%nextrevision%- increments the PDM revision counter.%previousrevision%- decrements the PDM revision counter.%initial%- resets revision to the scheme's first value.$(VariableName.ConfigurationName)- evaluates the PDM variable and uses its value.- A literal revision string supported by the vault's revision scheme.
csv
When used withsearch, saves results to a CSV file.
Notes
- This command affects only the PDM revision, not custom properties or configuration-specific metadata.
- When using PDM variables from a file card, include the configuration suffix. Use
.@for the file@tab, for example$(Revision.@). %previousrevision%adjusts the counter only if the revision scheme allows backward movement.%nextrevision%respects all revision scheme rules defined in the PDM Administration tool.