Skip to content

Instantly share code, notes, and snippets.

@aziascreations
Created August 17, 2017 10:35
Show Gist options
  • Save aziascreations/88a449c48713c29b480ba1560109a5d0 to your computer and use it in GitHub Desktop.
Save aziascreations/88a449c48713c29b480ba1560109a5d0 to your computer and use it in GitHub Desktop.
Simple script that lets go back in the current path easily
@echo off
if "%1"=="" (echo Error: No arguments passed ! && exit /B)
set "var="&for /f "delims=0123456789" %%i in ("%1") do set var=%%i
if defined var (echo Error: Non-numeric value passed ! && exit /B)
for /l %%x in (1, 1, %1) do cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment