windows server 2008 r2 - Looping for a file in a folder and get file name -
can explain me why not work.
for %%g in (c:\) echo %~ng
according documents.. %~ng should file name
if it's in batch file, you'd need %%~ng
.
if it's being executed directly prompt, you'd need for %g ...
either way, you'd need add filemask c:\*
Comments
Post a Comment