Last active
June 16, 2025 21:27
-
-
Save lukas-hetzenecker/e569fc2cd53a80312275787a38626910 to your computer and use it in GitHub Desktop.
Davinci Rename Clips after Create Date - Windows.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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