Sorting files in folders

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Sorting files in folders Mon Jul 06, 2009 3:06 pm • by hazelluver
here is my situation:
I would like to go through my torrents folder which contains one folder per torrent, and have the contents of those sub-folders sorted.

So if this is my folder structure:
[Torrents] (parent folder)
- [torrent folder 1]
-- movie file

- [torrent folder 2]
-- music file

- [torrent folder 3]
-- movie file

[square brackets] indicate folders
-- indicates file inside the folder

I would like to move all movie files to a movie folder outside the [Torrents] folder, music files to a music folder etc.

Anyone got a tip or even better a rules file to create this?

Thanks much!
J.
hazelluver
 
Posts: 1
Joined: Mon Jul 06, 2009 3:01 pm

Re: Sorting files in folders Mon Jul 06, 2009 4:20 pm • by a_freyer
This is exactly what Hazel is made for - it's real easy. Start by creating a rule for the 'Torrents' parent folder, and add these rules in this order:

(1) [Move into Subfolder Rule] - if (Kind is folder) then (Run rules on folder contents)
(2) [Move movies] - if (kind is movie) then (move file to /Movies/)
(3) [Move music] - if (kind is music) then (move file to /music/)

The advantage of adding rule (1) is that you don't have to create rules for each individual subfolder. I have a similar set of rules running on my downloads folder. I have added the following:

(4) [Delete empties] if (kind is folder) and (size = 0) then (delete)
(5) [Sort all other files] - if (type is anything) then (Sort into subfolder with pattern: /Misc/{FileType}/

This fifth rule will move all other files, except folders, into easy-to-find subfolders. It'll do this:

/TorrentFolder1/Movie.avi is moved to /Movies/Movie.avi
/TorrentFolder2/Sound.mp3 is moved to /Music/Sound.mp3
/TorrentFolder3/Picture.jpeg is moved to /Misc/JPEG Image Files/Picture.jpeg
/TorrentFolder4/Presentation.pptx is moved to /Misc/Microsoft PowerPoint Presentations/Presentation.pptx
/TorrentFolder5/Config.cfg is moved to /Misc/Configuration Files/Config.cfg

All the "TorrentFolders" will be deleted since they are now empty.

I posted a hint some months back that talks about a way to further sort your movies into /TV/ and /Movies/ based on their filesize. That is available here: http://www.noodlesoft.com/forums/viewtopic.php?f=3&t=412

That should be enough to get you started. In the future, if you've got support questions, you'll definitly get more traffic if you post in the "Support" forum.

Good luck!
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado


Return to Tips & Tricks - DO NOT POST QUESTIONS

cron