Reputation: 4214
I wanted to get the filename with absolute path but without the file extension in windows, but I am not able to figure that out. For example if the file is in C:\current_home\test.jpg, I want the echo output to be C:\current_home\test (without .jpg). The command I use below %~nf gives me just 'test' without absolute path. Any help will be appreciated.
for /R %f in (*.jpg) do echo %~nf
Upvotes: 4
Views: 4506