Sorting files by extension in the current folder

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

Moderator: Mr_Noodle

Imagine a folder of files of different types, eg PDF and doc
I want to create two new folders inside the original, called "PDF" and "Doc"
I want to select all the PDF files and drop them into the "PDF" folder and the same with the .doc ones.

HOWEVER... this will need to be done on several different folders, so setting a start folder is not really possible.
My structure would be in the form of
FOLDER1
-- PDF folder
-- Doc folder
FOLDER2
-- PDF folder
-- Doc folder
FOLDER3
-- PDF folder
-- Doc folder
FOLDER4
-- PDF folder
-- Doc folder

and so on.

Ideally I would want this to work on the CURRENT folder, triggered when I need to. It would be possible to do this once, renaming the start folder each time I got a new pile of files to work on, but that seems to defeat the object.

I can't see a way of doing this.
I've looked at Automator, but the "move files" feature seems to need an existing folder to put them in, rather than one created in the previous step. I have been told, via the developer of Keyboard Maestro that Perl can do this, but I don't want to have to learn a new language!

Any ideas would be welcome

Thanks in advance
MisterG
 
Posts: 5
Joined: Tue Jun 07, 2011 8:57 am

Are Folder1, Folder2, etc. all underneath the same folder? If so, you can set up a rule to descend into the folders (see the sticky article near the top of the support forum) but set it to only go one level deep. Then set the rule to file into subfolders, with the extra condition that the subfolder level is set to 1.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

The folders would be in the same "master folder", at some point. However, this master folder could be different, depending on the source of the material.

I think I'd better explain. I am a teacher. We get a lot of material on CD, wrapped in a PC-only interface. However, the interface is cumbersome and not required. The actual material is hidden away in "assets" or similar, and is usually MSOffice based. This is the material I want to grab and sort - they often have Word and PDF versions of the same thing!

I would like to be able to have a rule where the starting point depends on the master folder at the time. In effect I am looking for a "run the sorting rule on this folder" rule. I know I could edit the rule each time, but that seems a bit of a bind for a power user :)

Thanks again
MisterG
 
Posts: 5
Joined: Tue Jun 07, 2011 8:57 am

Unfortunately, I think you'll have to re-edit each time. I'm not sure how Hazel would know where the new master is each time.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support