Note: This doesn't escape spaces, so if your path has spaces, you may need to quote it. This Automator Service will now be in your Services menu. Save the Automator Service with whatever name you'd like it to have in the Services menu. Tell application "Finder" to set the clipboard to POSIX path of (target of window 1 as alias) Replace (* Your script goes here *) with: try Add a "Run AppleScript" action to the workflow.Change "Service receives selected" to no input (or "files or folders" to have it appear from a right click) and leave it set to any application (unless you only want it to work from a specific app, like the Finder). ![]() ![]() Open Automator and create a new Service.The path that is copied is simply text, so it can be pasted anywhere that you can paste text. This Automator Service will copy the path of the Finder's front window, rather than the path of a selected file or folder, so it won't affect what windows are open or what items are selected. You can use Automator to do this with a single keyboard shortcut that you can use from any app, and without installing 3rd party software.
0 Comments
Leave a Reply. |