Project Item Change Media Path
Replaces the source media path of an existing clip Project Item by calling Premiere's native changeMediaFilePath API. It does not rewrite .prproj files directly. The Project Item must belong to a project that is already open in Premiere. Use prProjectOpen first when operating on a copied project, then save the changed project with prProjectSave. The runtime checks CAN_CHANGE_MEDIA_PATH before attempting the relink and fails instead of guessing when Premiere reports that the item cannot be relinked. mediaPath accepts Automation Agent filesystem path forms, including supported special-path placeholders and embedded asset URIs. overrideCompatibilityCheck defaults to false. Keep it false unless the workflow deliberately accepts media that Premiere considers incompatible with the existing source. The operation is not undoable. storeResultIn receives Premiere's boolean success result; normal onError handling applies to thrown errors. After batch relinking, read MEDIA_PATH again for each affected Project Item when the workflow must verify the final paths before saving or closing the project. Use onError to decide whether errors stop the script, continue, or return false when the block supports it. If storeResultIn is set, the block also writes a result variable back to your graph.
Inputs
| Input | Required | Value Kind | Types | Enum Values |
|---|---|---|---|---|
item | yes | expression | reference, premiere-pathspec-string | — |
mediaPath | yes | expression | file-path-string | — |
overrideCompatibilityCheck | no | expression | boolean | — |
onError | no | expression | enum-string | STOP, CONTINUE, RETURN_FALSE |
storeResultIn | no | variable-name | variable-name | — |
Notes
- Replaces the source media path of an existing clip Project Item by calling Premiere's native
changeMediaFilePathAPI. It does not rewrite.prprojfiles directly. - The Project Item must belong to a project that is already open in Premiere. Use
prProjectOpenfirst when operating on a copied project, then save the changed project withprProjectSave. - The runtime checks
CAN_CHANGE_MEDIA_PATHbefore attempting the relink and fails instead of guessing when Premiere reports that the item cannot be relinked. mediaPathaccepts Automation Agent filesystem path forms, including supported special-path placeholders and embedded asset URIs.overrideCompatibilityCheckdefaults tofalse. Keep it false unless the workflow deliberately accepts media that Premiere considers incompatible with the existing source.- The operation is not undoable.
storeResultInreceives Premiere's boolean success result; normalonErrorhandling applies to thrown errors. - After batch relinking, read
MEDIA_PATHagain for each affected Project Item when the workflow must verify the final paths before saving or closing the project.
See Also
- Premiere Reference Paths: Explains Premiere reference path strings for project items, sequences, tracks, timeline items, markers, components, and parameters.
- Get Project Item Property: Reads properties of a project item such as name, media path, or tree path.