1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 21:22:09 +02:00
tldr/pages/windows/set-location.md
K.B.Dharun Krishna a8ec294384
style-guide, pages/windows/*: add note for PowerShell descriptions (#12904)
*: add note for pwsh descriptions

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-06-07 12:04:32 +02:00

797 B

Set-Location

Display the current working directory or move to a different directory. Note: This command can only be used through PowerShell. More information: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/set-location.

  • Go to the specified directory:

Set-Location {{path\to\directory}}

  • Go to a specific directory in a different drive:

Set-Location {{C}}:{{path\to\directory}}

  • Go and display the location of specified directory:

Set-Location {{path\to\directory}} -PassThru

  • Go up to the parent of the current directory:

Set-Location ..

  • Go to the home directory of the current user:

Set-Location ~

  • Go back/forward to the previously chosen directory:

Set-Location {{-|+}}

  • Go to root of current drive:

Set-Location \