Move to new folder I will name before files move?

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

Moderator: Mr_Noodle

Is there any logic for a rule to move files to a folder were the folder is not named in the rule?
I created a Keyboard Maestro trigger to prompt for a folder name and create a folder with that name.
I want to use Hazel to trigger this with a shortcut and move files to this newly created folder but I can't figure out how to instruct Hazel to move files to a folder that was just created.
Thanks in advance.
markyodo
 
Posts: 6
Joined: Mon Dec 13, 2021 12:14 pm

Where are these files in relation to the folder?
Mr_Noodle
Site Admin
 
Posts: 11230
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Where are these files in relation to the folder?

The files exist on an SD card or device connected to the computer via thunderbolt.
My logic looks like this:
Determine device connected. Hazel does this based on naming convention of the device plugged into thunderbolt.
Launch shortcut to prompt folder name & create new folder in a specific directory tree.
Copy files from SD card to newly created folder.

Thanks.
markyodo
 
Posts: 6
Joined: Mon Dec 13, 2021 12:14 pm

Is there some way the folder name can be derived automatically instead of having you enter it? Maybe some examples would help there.
Mr_Noodle
Site Admin
 
Posts: 11230
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Is there some way the folder name can be derived automatically instead of having you enter it? Maybe some examples would help there.

Unfortunately not. The reason for the input is to create a top level project folder with nested folders for project content.
Example:
I plugin a DJI Drone to import video and photos, Hazel actions watch for the specific name/location when the drone is plugged in. Currently Hazel knows based on device name, location, and file prefix, and extension (video, photo) that it's DJI drone content and copies the files to nested folders based on this info.
What I wanted to do is add a step that asks for a project name, create the project folder, then move the files to this project folder. It would be nice if Hazel could take the input from keyboard maestro for the project name and just move the files directly.
Currently it's a 2 step process. Using keyboard maestro I can do this and currently it asks for a project name, creates project directory, and moves any "new" files that Hazel had previously moved in step 1, effectively moving the files 2 times.
Thanks.
markyodo
 
Posts: 6
Joined: Mon Dec 13, 2021 12:14 pm

You'd probably need to write a script as there doesn't seem to be any relationship between the source and destination. It would make more sense to monitor the folder where you create the destination, since that is the trigger but there is no "copy from" action.

Only other way I can see this working is that instead of having KM create a folder, instead, have it tag the files directly with the name of the folder. You can then specify a move to the parent folder, then use Sort into subfolder with the tag.
Mr_Noodle
Site Admin
 
Posts: 11230
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I like both of those ideas. I will do some testing.
Thank you very much!
markyodo
 
Posts: 6
Joined: Mon Dec 13, 2021 12:14 pm


Return to Support