Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 854 Bytes

README.md

File metadata and controls

38 lines (32 loc) · 854 Bytes

Up

A better alternative for repetitive cd ..

Description

A powershell script that takes you up N directories in the hierarchy.

Inspired from this awesome StackOverflow answer.

Setup

Open powershell and execute,

notepad $PROFILE

A pop-up might appear, click Yes. In the script file add the following command,

Set-Alias -Name up -Value C:\Users\John\up\up.ps1

NOTE: The path to the up.ps1 script file you saved should be mentioned.

Save the file, Exit from powershell and reopen it to use the script or from the current session execute,

. $PROFILE

Usage

Example 1

C:\Users\John\Downloads> up
C:\Users\John>

Example 2

C:\Users\John\Downloads\Pictures> up 3
C:\Users>