Windows – how to list all files and directories in given directory with full path but not recursive

command linedirlswindowswindows xp

Somehow like dir /b command but I need also hidden and system files there. Built in dir command doesn't allow to list such 'hidden' files with the rest and I must use /s to have full path in there, which is of course non recursive.

I also played with windows version of ls command and there also no luck. To display full path you must add asterisk (mydir\*) at the end of directory you are listing, but this makes it recursive.

Best Answer

If you don't want to install anything, you could also use the following command:

for /f "delims=" %a in ('cd') do @for /f %b in ('dir /b /a') do @echo %a\%b

You have to cd into the directory first or it won't work.

Related Question