Copy folder but only when it's not empty

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Copy folder but only when it's not empty Tue Jul 06, 2021 5:50 am • by ruiguerreiro
Hi everyone,
I'm trying to set up a system to create temporary backups for my photography jobs when I copy them from the SD card to Lightroom.
I was originally using a feature in Lightroom that creates a backup copy in a folder in a location of my choosing, but Lightroom has a specific naming structure for such folders that names them with the import date, which is not what I want. I need to create that copy with the date of the job.
So, there are two ways, I think, that Hazel could help me do this: one it to, somehow, modify the copy that Lightroom creates and give it the job's date (I can't think of a way to do so, and unless you use Lightroom, you probably don't even know what I refer to, in which case, ignore this option), or I can have Hazel create a copy of the job folder itself, which is what I have achieved to a degree.
When I create a new job in Lightroom, it creates a folder in a location of my choosing, with a name of my choosing as well, so all I have to do is tell Hazel to create a copy of that folder to a location of my choosing. This problem with this is, as far as I know, Hazel creates the copy immediately after it detects a new folder, which doesn't quite work, as when the folder is created, most of the photos of the job, are still being copied from the SD card to it. This means that I end up with a backup copy, as I need, but with no photos in it, or only with a couple.
This said, is there a way to tell Hazel to only copy the folder when it has all the photos of the job in it? Or, can I tell Hazel to repeat the copy like 10-15 minutes later, when all the photos of the job should be in their new folder?
I hope this makes sense to you, and please, if you can think of a way to solve this, please do share.
Thank you so much,
Rui
ruiguerreiro
 
Posts: 11
Joined: Thu Oct 17, 2019 10:35 am

Re: Copy folder but only when it's not empty Tue Jul 06, 2021 10:00 am • by Mr_Noodle
Hazel can't really know that the other end is finished copying. You can try delaying matching by using a condition like "Date last modified is not in the last X minutes". Alternatively, you can set it up to sync the folder every time it is modified. If you check the manual, there is a chapter on how to sync a folder.
Mr_Noodle
Site Admin
 
Posts: 11235
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Hazel can't really know that the other end is finished copying. You can try delaying matching by using a condition like "Date last modified is not in the last X minutes". Alternatively, you can set it up to sync the folder every time it is modified. If you check the manual, there is a chapter on how to sync a folder.


Hi there,

Apologies for the late reply. I will try your suggestions.

Thank you so much!
ruiguerreiro
 
Posts: 11
Joined: Thu Oct 17, 2019 10:35 am


Return to Support