1

On an online tutorial on webservers, the guy(on a MAC) opened a folder which was on his desktop by typing **>> cd folder-2

open .** how do I do the same(equivalent to double clicking on the folder) using Powershell?

Akshada Pradhan
  • 13
  • 2
  • 2
  • 6
  • 3
    Possible duplicate of [Is it possible to open a Windows Explorer window from PowerShell?](https://stackoverflow.com/questions/320509/is-it-possible-to-open-a-windows-explorer-window-from-powershell) – Wai Yan Jul 28 '17 at 09:36

2 Answers2

4

There are three ways that immediately come to mind:

  1. start $folder, where $folder is the path of the folder to open - it can be either a fully qualified pathname (e.g., C:\Users\Me\Documents\Letters) or a relative pathname (e.g., Letters)

  2. Invoke-Item $folder, where $folder is the path of the folder to open, as above. By default, Invoke-Item has an alias, ii.

  3. explorer $folder, where $folder is the path of the folder to open, as above.

Method 1 also works in cmd.exe. Both method 1 and method 2 can also take a file name instead of a folder pathname, and will cause the default action for the item to occur - for example, Invoke-Item notes.txt or start notes.txt will open notes.txt in notepad (or your system default text editor).

Jeff Zeitlin
  • 9,773
  • 2
  • 21
  • 33
0

In cmd powershell type:

explorer.exe $path

where $path is the name of folder with full path

KlapenHz
  • 73
  • 10