Changes in dir command

  • Thread starter Michael J. Thurgood
  • Start date
M

Michael J. Thurgood

Within the command prompt in Windows Vista, the dir command now shows
non-zero byte counts for folders. This is a change from prior versions of
Windows such that now, the output from the "dir" command does not match
right-click, Properties from Windows Explorer in terms of total bytes for a
folder (including subfolders). Is there any way to change the behavior of
the "dir" command to report 0 bytes for folders?
 
M

Michael J. Thurgood

I need to clarify that these differences in the "dir" command appear to occur
when obtaining the directory of a CD or DVD. Folders still report zero bytes
within "dir" commands run on hard drives or network drives.
 
M

Michael J. Thurgood

I don't think a hidden desktop.ini explains the difference. I use the
following command to create a directory of archived data on CD / DVD for
later searching:
dir /w /s /A /OGN > [filename]

I believe using this syntax, all types of files should be included in the
directory output, including system and hidden files.

Here's an example output:
=======================================
Directory of F:\PDF_120605

02/07/2007 01:03 PM <DIR> .
02/07/2007 01:03 PM <DIR> ..
12/06/2005 05:20 PM 799,804 Figure-1.pdf
1 File(s) 801,288 bytes
=======================================

Though the folder only has one file, the total bytes for the folder is
larger than the bytes for the file, so bytes for the . and .. folders is
being included.

Here is an example from an empty folder:

=======================================
Directory of F:\Projects\Modeling

02/07/2007 12:45 PM <DIR> .
02/07/2007 12:48 PM <DIR> ..
0 File(s) 1,060 bytes
=======================================
 
J

Jim Dell

Michael said:
I don't think a hidden desktop.ini explains the difference. I use the
following command to create a directory of archived data on CD / DVD for
later searching:
dir /w /s /A /OGN > [filename]

I believe using this syntax, all types of files should be included in the
directory output, including system and hidden files.

Here's an example output:
=======================================
Directory of F:\PDF_120605

02/07/2007 01:03 PM <DIR> .
02/07/2007 01:03 PM <DIR> ..
12/06/2005 05:20 PM 799,804 Figure-1.pdf
1 File(s) 801,288 bytes
=======================================

Though the folder only has one file, the total bytes for the folder is
larger than the bytes for the file, so bytes for the . and .. folders is
being included.

Here is an example from an empty folder:

=======================================
Directory of F:\Projects\Modeling

02/07/2007 12:45 PM <DIR> .
02/07/2007 12:48 PM <DIR> ..
0 File(s) 1,060 bytes
=======================================

Mark L. Ferguson said:
You may find a hidden file named desktop.ini in those folders. The autorun
feature writes it.
--
Was this helpful? Then click the Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales/help/help_en-us.htm#RateAPostAsAnswer
Mark L. Ferguson
.
I think the space might be for the file system itself. Record a CD or
DVD with no files on it and see how much space is taken up.

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top