Moving archived files, copy unarchived

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

Moderator: Mr_Noodle

Moving archived files, copy unarchived Sun Jan 06, 2013 10:37 am • by JRhodes88
Hello,

I have my Hazel setup to unarchive my downloaded files if they are .rar and then move them to a "Movies" or "TV Shows" folder, but obviously keep the original folder and file structure intact for seeding purposes.

The one issue I am running into now is that Hazel will move all resulting "Movie" files (a movie file is considered to be bigger than 2GB) whether they are being unarchived or not.

What I want...A rule that first sees if a folder contains a .rar, if it does the resulting unarchived file is MOVED. If the folder contains a file that is bigger than 2GB but not a .rar the resulting file is only COPIED.

Thanks for the help!
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Moving archived files, copy unarchived Sun Jan 06, 2013 4:01 pm • by a_freyer
It sounds like adding a "not modified in the last 1 minute" would work for preventing movement of files being unarchived. Have you tried that?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Moving archived files, copy unarchived Mon Jan 07, 2013 3:51 pm • by Mr_Noodle
Do you have this set up with different sets of rules at different stages? How about doing the unarchive and move in one action. When you use Hazel's unarchive action, the subsequent actions operate on the results of the unarchiving. If you want to keep the original RAR intact, you can copy the RAR first to the destination then unarchive it.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Moving archived files, copy unarchived Tue Jan 08, 2013 7:59 pm • by JRhodes88
Mr_Noodle wrote:Do you have this set up with different sets of rules at different stages? How about doing the unarchive and move in one action. When you use Hazel's unarchive action, the subsequent actions operate on the results of the unarchiving. If you want to keep the original RAR intact, you can copy the RAR first to the destination then unarchive it.


Yes, I think this is part of a possible solution, but not sure if it's going to work with everything.

uTorrent downloads everything and once complete they go into a folder called "Complete"
From there Hazel is scanning that folder and I have a specific rule setup for each TV Show that I watch.
There is an overall unarchive rule that looks for files with .rar and opens The Unarchiver.
Then looks for a file name like "Breaking.Bad.S4E02.mkv" and moves the extracted file into the Breaking Bad folder under TV Shows (For Plex)

What I need is something specifically for Movies. If it has a big file that is compressed, uncompress it and move the extracted file to the Movies folder. If not compressed, then just copy that large file to the Movies folder.

Maybe there is an easy way to setup this SUPER CONFUSING setup.

I will be very grateful for a response and im sure my co-workers will also!

Thanks!
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Moving archived files, copy unarchived Mon Jan 14, 2013 1:03 pm • by Mr_Noodle
Have you tried using Hazel's Unarchive action instead of Uninstaller? One thing is that after unarchiving, the actions will operate on the unarchived folder, which may or may not help you here.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Moving archived files, copy unarchived Thu Jan 17, 2013 10:54 am • by JRhodes88
Mr_Noodle wrote:Have you tried using Hazel's Unarchive action instead of Uninstaller? One thing is that after unarchiving, the actions will operate on the unarchived folder, which may or may not help you here.


This is working for me except for one BIG flaw. Once it is done unarchiving, it moves all the archived files to the trash. I absolutely DO NOT want that to happen for torrent seeding purposes. I need those original files to be left intact.
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Moving archived files, copy unarchived Thu Jan 17, 2013 3:16 pm • by Mr_Noodle
Try copying the archive before unarchiving it.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Moving archived files, copy unarchived Fri Jan 18, 2013 10:46 am • by JRhodes88
Mr_Noodle wrote:Try copying the archive before unarchiving it.


This works in theory, but there is no "duplicate" option. If I'm copying it, Hazel will only allow me to copy it to another folder or its enclosing folder, but not the original folder itself.
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Moving archived files, copy unarchived Fri Jan 18, 2013 1:29 pm • by a_freyer
Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     kind is archive     
     color is not blue

Do the following to the matched file or folder:
     color blue
     copy to folder 'enclosing folder'
     sort into subfolder with pattern (source folder •)
     unarchive
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Moving archived files, copy unarchived Fri Jan 18, 2013 11:51 pm • by JRhodes88
a_freyer wrote:
Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     kind is archive     
     color is not blue

Do the following to the matched file or folder:
     color blue
     copy to folder 'enclosing folder'
     sort into subfolder with pattern (source folder •)
     unarchive


I'm going to try that tomorrow. What exactly does the "sort into subfolder" action do?
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Moving archived files, copy unarchived Fri Jan 18, 2013 11:58 pm • by a_freyer
It will take whatever file or folder is passed to it and move that file into the folder structure you define. In this case, we are moving to the parent (enclosing) folder before we move to the matched folder (original folder). We are tricking hazel into copying a file in the same directory by copying it to the parent directory and moving it to the parent's subfolder which just happens to be our original matching folder.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Moving archived files, copy unarchived Sat Jan 19, 2013 6:33 pm • by JRhodes88
Thanks for the help, I really appreciate it. This seems to be working properly...the only thing I notice is the files im downloading are in separated archives (.r01, .r02, .r03, etc...) and then finally a .rar that is unarchived. Hazel fails the unarchive until it sees the .rar which is the last to be copied. Any harm with it failing or anyway around that? Like it needs to wait for the .rar and THEN unarchive.
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Moving archived files, copy unarchived Tue Jan 22, 2013 1:35 pm • by Mr_Noodle
It has to start with the initial rar to unarchive properly. Having it fail on the others is not necessarily harmful unless you intended to have those files match a different rule. You could write the conditions to not match those files if you want.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support