MacOS – “New Folder with Selection” question

findermacosshortcut-menu

I'm looking for a way to change the minimum number of files required to 1 so I can make a folder from a single selected file rather than having to have 2 selected before it becomes available.

To see what I mean…

Go to Finder
Select any two (or more) files in the same folder or the Desktop.
right click on the selection
you will see a choice "New Folder with Selection (x items)"

I would like to be able to only select one and have that choice appear.

Thanks.

Best Answer

I would suggest creating a new Service in Automator. Adding a service to the finder will add it in the contextual menu !

  1. Create new service
  2. Servicce receives selected in
  3. Add a run AppleScript Action
  4. Paste the following code

Using just a simple AppleScript

on run {input, parameters}

tell application "Finder"
    set thePath to first item of input
    set ParentFolder to container of thePath
    set theFolder to (make new folder at ParentFolder)

    repeat with aFIle in input #For each file in input 
        move aFIle to theFolder
    end repeat
end tell

end run

Save it and enjoy the new service by selecting your new service in the contextual menu of one of your folders.