Page 1 of 1

Don't copy file if it exists in a subfolder

PostPosted: Wed Aug 27, 2014 6:49 pm
by Azurite
Hi there,
I have a rule that looks at a shared Google Drive where a bunch of files (completely disorganized, but all the same file type) live.

I have a rule that says to check the shared Google Drive folder, then copy them to a folder on my external hard drive. I'm trying to figure out a way where Hazel sees that the external drive's folder has SUBFOLDERS that organize the content--in other words "If (file of kind) exists in (subfolder with depth 1), then do not copy." But if it DOES exist, then it can dump it in the main folder so that I can sort it out.

Or should I create separate rules that say "file of kind" and "name contains" so that it can just put it into the appropriate folder?

The way things stand right now, I'm ending up with duplicates on my external drive, some in subfolders (organized) and some not!

Re: Don't copy file if it exists in a subfolder

PostPosted: Thu Aug 28, 2014 11:58 am
by Mr_Noodle
Can you give a more concrete example as I'm not totally following you here. Are the files actual duplicates or do they just share a name (also not sure why you are basing it off of "kind" here).

Re: Don't copy file if it exists in a subfolder

PostPosted: Fri Sep 12, 2014 11:19 pm
by Azurite
I'm a member of an AV club where we watch two series every week. The series are usually movie files of some kind.

What I'm trying to do is have Hazel look in the Google Drive folder, then, if it sees a movie that it doesn't already have on my external drive's AV club folder, copy that file over.

So if we have
Google Drive > SeriesA-1.mov and SeriesB-12.mov
and
External Drive > Series > SeriesB-12.mov
Hazel should see that it already has SeriesB-12.mov in a subfolder of the External Drive and not try and do anything, but it doesn't have SeriesA-1.mov, so it should copy that into External Drive (because no subfolder for the Series exists yet), for me to sort out later.

Does that make sense?

Re: Don't copy file if it exists in a subfolder

PostPosted: Mon Sep 15, 2014 3:42 pm
by Mr_Noodle
When using the copy action, if the file exists at the destination, you can set it to not perform the copy. Note though, that this only goes by filename. It doesn't do any sort of comparison of the file's contents or any other sort of rigorous dupe detection.