I learned from the forum that this command is very useful to get the single file name + extension name
for /r %a in (*.*) do @if exist %a echo %~nxa
Encountered the following problems:
1. Can you add a path after in?
Like this: for /r %a in (%CD%\*.*) do @if exist %a echo %~nxa
But it doesn't run
2. If you want to get the complete path name, file and extension name, how to do it?
Like this result:
C:\Windows\notepad.exe
c:\windows\hh.exe
Thanks for the advice
for /r %a in (*.*) do @if exist %a echo %~nxa
Encountered the following problems:
1. Can you add a path after in?
Like this: for /r %a in (%CD%\*.*) do @if exist %a echo %~nxa
But it doesn't run
2. If you want to get the complete path name, file and extension name, how to do it?
Like this result:
C:\Windows\notepad.exe
c:\windows\hh.exe
Thanks for the advice
