1

I would like a terminal command to open a "new" window in addition to any I already have open (preferably the downloads folder).

Running "open ." will only open if there are no other Finder windows open.

Is there a way to do this with the terminal, or if not with AppleScript?

2
  • 1
    You can use osascript to run an AppleScript telling the Finder to open a new Finder window - see the Finder’s scripting dictionary for its classes and commands.
    – red_menace
    Oct 12, 2022 at 4:11
  • open . should open a Finder window irrespective of whether there are other Finder windows open. The period (".") is shell shorthand for the current working directory, and most shells will expand it to the full path, e.g. /Users/CK/some/folder, which is the actual argument sent to the open command, and thus the path to which a Finder window should appear (if a Finder window to that path already exists, then that window is brought to the front). If this is not happening for you, then something is wrong.
    – CJK
    Oct 12, 2022 at 16:00

1 Answer 1

2

If you want to open new Finder (or any other application) window from terminal/bash shell then use -n flag ("Open a new instance of the application even if one is already running"):

open -n .

For opening new Finder window in downloads:

open -n ~/Downloads
2
  • If it solved your problem then please mark it as answered. Oct 12, 2022 at 8:27
  • If Finder is not running, then open -n ~/Downloads outputs: The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600002198d20 {Error Domain=NSPOSIXErrorDomain Code=162 "Unknown error: 162" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
    – that-ben
    Dec 21, 2023 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .