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
2.1m questions
2.1m answers
60 comments
57.0k users