Type the following command in Terminal: open This command will open a new Finder window in the current directory. To do this, follow these steps: Open Terminal by pressing Command + Space to open Spotlight Search, type Terminal, and press Enter. I’m too lazy to provide a new screen snapshot today, but here in 2023, my OpenTerminalInFinderDir.scpt script appears at the bottom of a similar-looking menu on the menubar. The simplest way to open Finder from Terminal is to use the ‘open’ command. When you combine this with enabling AppleScript in the Mac menubar (see the link below), the result looks something like this: Here in April, 2023, I named this file OpenTerminalInFinderDir.scpt, and put it in either /Library/Scripts/AlsScripts or ~/Library/Scripts/AlsScripts. When I have a Mac Finder window in the foreground and run this script from the AppleScript menu on the macOS menubar, it opens a new Mac Terminal window, and automatically places me in the same directory as the current Finder folder. Set thePath to (quoted form of POSIX path of (target of myWin as alias)) Fortunately the script code is relatively readable. I couldn’t find any other way to do this, so I finally wrote an AppleScript script to do it. AppleScript code to open a Terminal in the current Finder folderįor a while I have wanted to be able to open a Mac Terminal window in the same directory as the Mac Finder folder that I’m currently looking at. This keyboard shortcut can be done from any Finder window. Any hidden folders or files will appear as grayed-out. at the same time will display any hidden folders in your Macs hard drive. ![]() ![]() Apple/macOS Terminal/Finder tip: This tutorial shows how to open a Mac Terminal window in the current Finder folder by using AppleScript. On most Macs, the hard drive is entitled 'Macintosh HD'.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |