1.

Solve : How to make a bat file to LOG all the DIRs in all the drives??

Answer»

i have a really old pc, and im about to giv it away, but before i do i want to see if theres any file i need, and its a little slow for going to all the dirs to check, plus, i had some hidden files....ect

can any one point me to a batch that will LOG all the dirs in each drive including the hidden files/?
 dir /A:DHS /S C:\ >C:\dir.txt

should workNo - it does not work on Windows XP Home edition with SP3.

The problem is the first argument /A:DHS
This show nothing but hidden system folders.

If you want to list ALL files then use /A:-D
which omits all folders and shows all files regardless of atrributes

I show below three sets of results listing nothing but root of C:\
I have not used the /S option (I WOULD deserve to be banned if I posted a 40,000 file listing).

Omitting all arguments, I see 5 files and 8 folders, all public (un-hidden and non system).
Using /A:DHS I see 0 files and 5 folders (all hidden / system)
Using /A:-D I see 0 folders and 15 files (public and also hidden/system)

Code: [Select]Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Dad>dir \
 Volume in drive C is ACER
 Volume Serial Number is EC16-8702

 DIRECTORY of C:\

15/12/2007  08:45             1,024 .rnd
20/05/2003  16:33                 0 AUTOEXEC.BAT
04/09/2004  10:20               210 boot.ini.comodofirewall
20/05/2003  16:33                 0 CONFIG.SYS
10/05/2007  20:01    <DIR>          Documents and Settings
16/09/2007  13:13    <DIR>          ERDNT
05/04/2008  10:42               201 fix_srDrive.reg
06/03/2003  14:29    <DIR>          I386
14/06/2008  15:20    <DIR>          Netgear
19/08/2008  14:39    <DIR>          Program Files
28/05/2007  17:47    <DIR>          temp
07/01/2007  14:39    <DIR>          VTPFiles
26/11/2008  08:39    <DIR>          WINDOWS
               5 File(s)          1,435 bytes
               8 Dir(s)  11,356,561,408 bytes free

C:\Documents and Settings\Dad>dir \ /A:DHS
 Volume in drive C is ACER
 Volume Serial Number is EC16-8702

 Directory of C:\

24/11/2008  07:40    <DIR>          Config.Msi
28/05/2007  21:30    <DIR>          Diskeeper
02/06/2003  16:10    <DIR>          Recycled
29/05/2007  07:40    <DIR>          RECYCLER
21/08/2007  06:58    <DIR>          System Volume Information
               0 File(s)              0 bytes
               5 Dir(s)  11,356,561,408 bytes free

C:\Documents and Settings\Dad>DIR \ /A:-D
 Volume in drive C is ACER
 Volume Serial Number is EC16-8702

 Directory of C:\

15/12/2007  08:45             1,024 .rnd
20/05/2003  16:33                 0 AUTOEXEC.BAT
23/12/2006  22:04               211 boot.ini
04/09/2004  10:20               210 boot.ini.comodofirewall
20/05/2003  03:32               512 BOOTSECT.DOS
20/05/2003  16:33                 0 CONFIG.SYS
05/04/2008  10:42               201 fix_srDrive.reg
03/12/2008  16:02     1,323,814,912 hiberfil.sys
19/10/2003  15:28                 0 IO.SYS
19/10/2003  15:28                 0 MSDOS.SYS
04/09/2004  10:11            47,564 NTDETECT.COM
19/08/2008  12:46           250,048 ntldr
12/06/2008  06:52                 8 os ztwdt. fs
03/12/2008  16:02       377,487,360 pagefile.sys
20/05/2003  03:27                65 PRELOAD.AAA
              15 File(s)  1,701,602,115 bytes
               0 Dir(s)  11,356,516,352 bytes free

C:\Documents and Settings\Dad>
Regards
Alan



Discussion

No Comment Found