Skip to main content

Project Item Change Media Path

Category: Pr Bins & Project Items Project Item Change Media Path block screenshot

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

InputRequiredValue KindTypesEnum Values
itemyesexpressionreference, premiere-pathspec-string
mediaPathyesexpressionfile-path-string
overrideCompatibilityChecknoexpressionboolean
onErrornoexpressionenum-stringSTOP, CONTINUE, RETURN_FALSE
storeResultInnovariable-namevariable-name

Notes

  • 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.

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.