Skip to content

Instantly share code, notes, and snippets.

@melmatsuoka
Last active August 29, 2015 14:07
Show Gist options
  • Save melmatsuoka/49e3c322e8226eb94c39 to your computer and use it in GitHub Desktop.
Save melmatsuoka/49e3c322e8226eb94c39 to your computer and use it in GitHub Desktop.
Takes RED .RMD files from source folder full of RMD files (i.e. flat folder containing nothing but .RMDs), and copies them to their associated .RDC folders located in a different location. This is an annoying workaround to DaVinci Resolve not copying .RMD files along with their associated .R3D files when doing a media consolidation.
#!/bin/bash
#
# takes RMD files from source folder full of RMD files (i.e. flat folder containing nothing but .RMDs),
# and copies them to their associated .RDC folders located in a different location.
RMDFILES="/path/to/rmd_originals"
RDCFOLDER="/path/to/RDC_folder"
FOLDERS=$(ls -l $RDCFOLDER | awk '{print $9}')
for RDC in $FOLDERS
do
FOLDERBASE=$(echo ${RDC} | cut -c 1-16)
#echo ${RDC}
cp "$RMDFILES/$FOLDERBASE.RMD" "$RDCFOLDER/$RDC/"
#echo $FOLDERBASE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment