Skip to content

Instantly share code, notes, and snippets.

View zhanglintc's full-sized avatar
🐦
Working from home

Lane zhanglintc

🐦
Working from home
View GitHub Profile
@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"