Created
September 29, 2021 15:41
-
-
Save rvegajr/424285933c1677899ce05948dedb8ee6 to your computer and use it in GitHub Desktop.
Get the parent path and child path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: --HAS ENDING BACKSLASH | |
set batdir=%~dp0.. | |
:: --MISSING ENDING BACKSLASH | |
:: set batdir=%CD% | |
pushd "%batdir%" | |
set rootPath=%cd% | |
rem @echo off | |
set srcdir=%rootPath%/Src | |
:: --MISSING ENDING BACKSLASH | |
:: set batdir=%CD% | |
pushd "%srcdir%" | |
set srcPath=%cd% | |
@echo rootPath=%rootPath% | |
@echo srcPath-%srcPath% | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment