Skip to content
/ up Public

Go back 'N' levels in the directory hierarchy easily!

Notifications You must be signed in to change notification settings

miltontom/up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

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>

Packages

No packages published