Register / Login  |  Desktop view  |  Jump to bottom of page

Cookbook and FAQ » Excluding files in a specific path above a certain file size?

Author: Steven Haver
4 years ago
Hello, I am trying to keep some large files out of my archive. My question is: is there a way that I can exclude files in a specific path (folder and sub folders) above a certain file size?

A couple of times per month I receive some large video files that need to be edited. They are usually over an hour long but only about 5-10 minutes of the content is actually useful and the rest can be deleted. Sometimes the files are as small as 5GB but they can easily be 70+GB depending on their length and how they were recorded. So what I usually do is decide which parts need to be saved, make the edits, and then render those clips into new files so I can delete the original file. Also, at the same time I receive the large files I also receive a lower resolution file that contains all of the important clips which could be used as a backup in the event of sudden data loss.

My old workflow was to put all the files (the large video files but also all the other files associated with that project) into a TEMP folder which is excluded from my archive. Once I have made the final edit and everything is in its final form I delete any unneeded files and move the project to the folder where it belongs (which will be captured). This used to work great because I would usually complete the projects within a couple of days, so there was no real risk of data loss because there would still be copies in the cloud if something bad happened. But during the pandemic I started falling behind and the undone projects have been piling up, so I decided it would be better to have just the large video files in the excluded TEMP folder and all the other project files are in their normal location (and therefore get captured).

Unfortunately, that is proving not to be an ideal solution either because when the files are not all together it increases the chances of me making a stupid human error and deleting the wrong file etc. So, ideally, I would be able to leave all the project files together in the same folder but exclude the large files from being captured to the archive. Any ideas? Thanks!

Author: James Bucanek
4 years ago
 
Steven Haver wrote:Hello, I am trying to keep some large files out of my archive. My question is: is there a way that I can exclude files in a specific path (folder and sub folders) above a certain file size?


Unfortunately, the short answer is no. File exclusions (which are already pretty complex), at the end of the day, simply include or exclude files. There's no "exclusion math" that can be made to make discrete decisions for individual items.

Unfortunately, that is proving not to be an ideal solution either because when the files are not all together it increases the chances of me making a stupid human error and deleting the wrong file etc. So, ideally, I would be able to leave all the project files together in the same folder but exclude the large files from being captured to the archive. Any ideas? Thanks!


I have two suggestions.

My first suggestion would be to keep the arrangement you have now (leaving the huge files in a TEMP or DO NO BACKUP folder), and your working project files in individual project folders.

If one of those huge files really belongs to a project, create an alias or symbolic link in that project folder to the (correct) huge file in the TEMP folder. For the most part, it will be as if that huge file is actually in your project folder (you can see it, preview it, open it, drag it into applications, ...) but the actual file will be in the TEMP folder, where it will not get captured.

My second, and slightly-more-technical, suggestion is to use an exclusion pattern to exclude all folders below a particular folder level with a specific name (like DO NOT BACKUP).

In this scheme you'd keep all of your files (both large and small) inside a top-level Projects folder, organized into project subfolders, however you like. Then, wherever you need one, create a DO NOT BACKUP sub folder and move some very large files into that sub-folder. For example:
Projects/
News Project/
Exclusive Video Footage.mv4
Graphics.psd
Voice Over.mp3
DO NOT BACKUP/
Hours of Surveillance.avi
Holiday Project/
Jingle Bells.mp3
DO NOT BACKUP/
Unedited Santa Clause Interview.mkv
...

Now select your top-level Projects folder in the Finder. From the menu, choose Finder > Services > QRecall Capture Preferences...

Locate the Exclude Patterns in the capture preferences. Click the plus button and choose Add glob Pattern. Edit the pattern so it looks like this:

(empty) // DO NOT BACKUP [∞]

Leave the first field empty (no path), the pattern set to the exact name of the folders to exclude, and make sure the infinity symbol option is checked. This exclusion patten will, starting at the level of your Projects folder, exclude any item (file or folder) that is named, exactly, NO NOT BACKUP. It doesn't matter how many DO NOT BACKUP folders you create, or how deeply they're nested in other folders, they all get excluded.

Alternatively you could use a filename convention, rather then creating specially named folders. To do that, you'd use a glob pattern like this:

(empty) // EXCLUDE* [∞]

That glob pattern will match any file or folder that begins with the word EXCLUDE. (If you want this to be case sensitive, you'll have to use an expert pattern.) So the file "EXCLUDE Hours of Surveillance.avi" will get ignored, but the file "Exclusive Video Footage.m4v" will get captured. Again, with the infinity symbol checked, it doesn't matter where in the Projects folder hierarchy these items appear, they all get excluded.

Let me know if either of these is a workable solution.

Author: Steven Haver
4 years ago
That is awesome. Thank you for such a thorough reply. I am going to try the alias approach first. I think that will work perfectly but I won't know for sure until I work through a project. I don't use aliases very often, so I hadn't thought of that as a solution.

The exclusion pattern approach would also work. And, in fact, I can think of another good use for it. So thank you so much because I had never set up an exclusion pattern but now that I see how it's done it makes perfect sense. Really appreciate it.




Register / Login  |  Desktop view  |  Jump to top of page