How can I list all files (including system and hidden) on all hard drives (not removable drives)?
I think in something like a:
dir -a -h *.* /s > file.txt
but this is for the specific drive where I'm.
How can I do something like that but with C:, D:, etc,
but I don't know the DOS's name of the drivers, and i need a .bat to do this (an automatic listing). Implementer can't also know the names of drivers.
Best Answer
There is a program that can detect CD drives (
FINDCD.EXE
) that comes on some boot disks (including the Windows 98 Emergency Boot Disk) which you can use in a batch file to skip them:I just threw this together off the top of my head (with no testing since I am currently in Windows), but it should do the trick for the most part. Note that floppy drives are always assigned a drive letter starting with A while hard-drives always start at C, so this skips A and B.
There is also a program that can detect RAM drives (
FINDRAMD.EXE
) which you can use to detect and skip RAM drives if you have those, but that requires more work (and a separate batch file). Look atSETRAMD.BAT
which is usually included for an example.