My PowerShell prompt's currently pointed to my C drive (PS C:\>
). How do I change directory to a folder on my Q (PS Q:\>
) drive?
The folder name on my Q drive is "My Test Folder".
This question is related to
powershell
Set-Location -Path 'Q:\MyDir'
In PowerShell cd
= Set-Location
To go directly to that folder, you can use the Set-Location
cmdlet or cd
alias:
Set-Location "Q:\My Test Folder"
If your Folder inside a Drive contains spaces In Power Shell you can Simply Type the command then drive name and folder name within Single Quotes(''):
Set-Location -Path 'E:\FOLDER NAME'
You can simply type Q:
and that should solve your problem.
Source: Stackoverflow.com