How to list all files in HD?
Posted: 16 Dec 2023 11:58
Ok, the answer is simple, just:
Or if you want to list in ALL disks, just do:
But there is a bug in the dir /s command. If I am administrator (privilege) when there is a Directory JUNCTION it loop and list the same folder over and over. I didn't find a way to not list this juncion.
I can't use Powershell, only cmd.exe. And I can't use forfiles cmd, because it is really slow. For every file it will need to start a new cmd to print the value. If I try to list all files, it will take a lot of time!
So: How can I list all files in HD as Administrator:
Code: Select all
dir /s
Code: Select all
for /f "tokens=2* usebackq delims==" %x in (`wmic logicaldisk get caption /value`) do @(for /f "delims=:" %y in ("%x") do @(dir %y:\))
I can't use Powershell, only cmd.exe. And I can't use forfiles cmd, because it is really slow. For every file it will need to start a new cmd to print the value. If I try to list all files, it will take a lot of time!
So: How can I list all files in HD as Administrator:
- Using ONLY default windows tools?
- Using small software to do it with command line?