A request from an elderly man who has not the excellant skillset of the Users here… I am too old to start a new learning curve and I admit that it is a little too much for me to grasp !. So I am searching for some kind person to create me a *.KMA
I have no problems paying or donating for the privilege of importing a prepared file into KM.
I have 25+ folders with 10 files in each folder….What I would to have:
I select files/folders
Use Hot Key “Control/Option/Command i”
It Copies the file Name
It Creates a folder with the file Name
It Moves the file into the Folder
It Goes to the next File and repeats until finished.
When you say that the folder needs to be identical to the selected file, do you mean - as an example - that if the file is named mydocumentation.docx, the folder is also called mydocumentation.docx or should be mydocumentation?
If the file name is “Anything I Do.mid” I would like it to copy ‘AnythingI Do” and create a folder called “Anything I Do” and move “Anything I Do.mid” into the folder
And if you select two files named Anything I do 1.mid and Anything I do 2.mid. Both to Anything I do 1 or the first to Anything I do 1 and the second to Anything I do 2?
--
-- Created by: Fred Appelman
-- Created on: 25/02/2026
--
--
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "Finder"
set p to (get name)
repeat with finder_selection in (get selection)
set file_name to name of finder_selection
set parent_folder to parent of finder_selection
set the_command to "echo \"" & file_name & "\"|sed \"s/\\..*$//\"" as string
set base_name to do shell script the_command
set new_folder to make new folder at parent_folder with properties {name:base_name}
move finder_selection to new_folder
end repeat
end tell
You can launch this from KBM by:
Create a group named Finder
Optionally change the icon to the Finder icon
Optionally limit the macros to be only active in Finder
This is just to off a few words of encouragement, if I may be so bold! Keyboard Maestro is not as scary as it might at first seem, and since you were able to post here, I’m sure you’re not too old to pick up the basics! Then (as for all of us) you can continue to come to the forum for help as needed.
Start by making simple macros and your knowledge (and ideas for macros) will build over time, at a rate that suits you.
Edit: I see that you are not in fact a complete KM newbie (“last post was 5 years ago”), but I shall leave this post up just in case you or any other “mature” users still need the encouragement!
Adding functionality is alwasy possible. However, this leads to other questions, like what to do if it contains other folders etc.
If you double click on you selection, i.e. open the folder Everly Brothers, you can do a select all with Command-A followed by your shortcut. That is simple isn’t it?
Please don’t get me wrong, I am over the moon with the functionality added to my workflow and I am very greatful for all your time and effort……. Some times I will have a folder with many, many folders inside. It sure would save some key strokes
if you find some time to do this Great if not, this is not a deal breaker for me, I am quite happy with your efforts..
--
-- Created by: Fred Appelman
-- Created on: 26/02/2026
--
--
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "Finder"
repeat with finder_selection in (get selection)
set sub_folder to finder_selection
set sub_files to files of sub_folder
repeat with sub_file in sub_files
set file_name to name of sub_file
set parent_folder to finder_selection
set the_command to "echo \"" & file_name & "\"|sed \"s/\\..*$//\"" as string
set base_name to do shell script the_command
set new_folder to make new folder at parent_folder with properties {name:base_name}
move sub_file to new_folder
end repeat
end repeat
end tell
Warning: This script only works on folders and you can use it in your test case where you have many folders. It will only process the files in the folders