Cleaning up unnecessary camera files

to get rid of DCIM, THM and more…

Cleaning up unnecessary camera files

to get rid of DCIM, THM and more…

The functionality decribed in this arcticle is now fully available in Hedge as Filter & Rename.

Modern cameras create not just clips, but a whole folder structure along with it. Next to that, all kinds of technical files are made alongside the actual clip. To most of us it’s totally unclear if any of those files are necessary at all, or just a byproduct or waste.

These files don’t take up much disk space, so why bother? Well, most of us don’t but our minds certainly do. They strive for a tidy workplace, so we feel like we should clean-up all that “mess”. Luckily, we have some tools to aid us. Which one to use, depends on when you need it 👇

The occasional clean-up

If you want to get rid of a certain file type that’s all over your drive, Finder offers quite powerful search tools. You can filter by extension, file size, file kind and combine whatever you need. It’s pretty good for locating a specific file, but also for the opposite: finding a bunch of unneeded files or empty folders.

The caveat: you can only search for a single file type at a time, so it’s not a catch-all solution. Even when saving your search as a Smart Folder, you’ll need to create several for all the separate things you want cleaned out.

The thorough clean-up

With AppleScript, you can do a lot more than just a Finder search. We’ve combined a few essential clean-up tasks into a simple AppleScript called Cleaner:

Download Cleaner.scpt

With it you…

📁 Get a list of all file types in a folder you select

📄 Select those you want trashed

↖️ Choose to move the remaining files to the root of the folder

🗑 Trash all empty folders, if you want to.

Let’s say you run Cleaner on a disk with a Canon 5D folder structure. What will happen is that the script will sniff out all .THM files, trash them, move all .MOV clips to the root. It then trashes all empty DCIM, MISC and 100EOS5D folders. You end up with a neat list of all your clips.

You can also skip steps so you can use Cleaner anyway you like. Run it on just a folder or a complete disk. If any duplicates are found while moving files to the root, the script will leave the file in its original location, so it’s easy for you to spot and fix if needed.

Tip: before archiving a complete project, use Cleaner for clearing out temp save files and renders 👍

The continuous clean-up

Being fans of automation, why not automate the clean-up too? Since Cleaner is an AppleScript, Hedge can clean up your transfers on the go.

We’ve added a few settings to the script to make it easy to use in a video production workflow:

set fileExtensionList to {"ask"}
-- Define the file extensions (not case sensitive) you want to trash (i.e. {".XML", ".BIM"} or set to {"ask"}

The default behaviour of Cleaner is to prompt a complete list of extensions. If you shoot with the same camera all the time, it’s probably easier to define a profile that fits your needs:

{“.THM”, “.CR2”, ".XMP"} 

If you want to move the files to the root…

set flattenFolder to "ask" 
-- Set to "ask", "OK" or false

…and if you’d like to get macOS desktop notifications about the progress:

set showNotifications to true 
-- Do you want macOS progress notifs

This way, it’s easy to set up a standardized workflow. If for some reason you still end up with a non-cleaned folder, you just run the script from Script Editor and be done with it.

Closing Titles

Both the app and the script are free to use, and you’re welcome to improve it if you want to. Please let us know if you do, so we can feature it 👍

Liked this? Here’s a $10 coupon for Hedge, the fastest way to back up media.