Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save lukas-hetzenecker/e569fc2cd53a80312275787a38626910 to your computer and use it in GitHub Desktop.

Select an option

Save lukas-hetzenecker/e569fc2cd53a80312275787a38626910 to your computer and use it in GitHub Desktop.
Davinci Rename Clips after Create Date - Windows.py
subprocess = importlib.import_module("subprocess")
pathlib = importlib.import_module("pathlib")
clips = resolve.GetProjectManager().GetCurrentProject().GetMediaPool().GetCurrentFolder().GetClips()
for clip in clips.values():
path = clip.GetClipProperty()['File Path']
d = subprocess.check_output(f'"C:\Program Files\MediaInfo\MediaInfo.exe" "--Inform=General;%Encoded_Date%" "{path}"', shell=True).strip()
name = str(d, encoding='ascii') + ' ' + path.split('\\')[-1]
print(name)
clip.SetClipProperty('Clip Name', name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment