Given that the current directory, %CD% is
%CD%
C:ParentChild
In a batch file, how can I get the value Child in to a variable?
Child
thanks
for %%a in (.) do set currentfolder=%%~na echo %currentfolder%
From here: https://superuser.com/questions/160702/get-current-folder-name-by-a-dos-command
1.4m articles
1.4m replys
5 comments
57.0k users