How can this Automator Service for Finder be created?
- I'd like to be able to use Finder's Context menu (by right-clicking a Finder item) to run a Service that gets the file paths of the selected files.
- The paths should be entered into a Text File (which can be unsaved or saved in the current folder).
Furthermore:
-
I currently only need to be able to get the paths of multiple selected files – but not the paths of subfolder contents, etc. I hope that serves not to overcomplicate things.
-
I would prefer if the filenames don't have Escaping Spaces (
"Like\ This"
), but instead normal spaces – but if there's a setting for that, I'd like how to alter between the modes within the script.
Best Answer
If you're looking for something that's more "pure Automator," here's one option (although, as was mentioned in the comments, right-clicking on the items in Finder, holding option, and selecting
Copy Items as Pathnames
is probably the easiest solution):files or folders
inFinder
Inputs
/usr/bin/dirname "$1"
(make sure to pass inputas arguments
)Parent Folder
Inputs
<-- this should not accept input (right-click on the action and selectIgnore Input
)Plain text
, [whatever file name you want],Parent Folder
(drag this in from the variables list))I've included a screenshot below: