Created
May 30, 2024 11:33
-
-
Save zhanglintc/430e04590a64c7673eaf174a9f3634a3 to your computer and use it in GitHub Desktop.
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 | |
SET var=C:\Folder1\Folder2\File.txt | |
echo before: %var% | |
call :getFolder "%var%" var | |
echo after: %var% | |
exit /b | |
:getFolder | |
set "%2=%~dp1" | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment