Given the batch file foo.bat
@echo %~dp1
In the current directory c:\subdir
... if one executes
c:\subdir>foo c:
A Windows 7 command prompt window echoes C:\
I would expect C:\subdir\
Why is C:\
produced when I am referring to the current directory (not the root)?
Dir seems to handle it properly... again given one is in c:\subdir
:
c:\subdir>dir c:/b/s
yields C:\subdir\foo.bat