Windows Explorer (and FSO) doesn't know how to reliably count files and subfolders - other options?

Ask a Question related to Windows Server, Design and Development.

  1. #1

    Default Re: Windows Explorer (and FSO) doesn't know how to reliably count files and subfolders - other options?

    "Michael Herman (Parallelspace)" <mwherman@parallelspace.net.no#$#spam>
    wrote in message news:Ozw2NkyREHA.1392@TK2MSFTNGP09.phx.gbl...
    > The folder properties dialog in Windows Explorer and the FileSystem object
    > both on a Windows Server 2003 system doesn't provide accurate counts of
    the
    > number of files and subfolders in a parent folder.
    >
    > This is a huge suprise to me that the Windows Explorer folder properties
    > dialog is unreliable.
    >
    > When the length of a file path is at or near the maximum length of 248 for
    > the file path and 260 for the fully qualified path name, Windows Explorer
    > produces a garbage number that can be off by thousands of files.
    >
    as always, a simple workaround is to use FindFirst/Next but using the 8.3
    version of the pathnames so that you never exceed the 260 chars limit

    GetShortPathName may help but itself has a limit of 260 chars, so you may
    need to write your own

    ---
    [url]www.netez.com/2xExplorer[/url]


    nikos Guest

  2. Similar Questions and Discussions

    1. W23: Windows Explorer (and FSO) doesn't know how to reliably count files and subfolders - other options?
      DIR directory /S fails and never produces a result. I have a couple CMD files that re-creates a sample folder and file hierarchy. Michael. ...
    2. Windows Explorer opens PDF, clicking EXIT causes explorer "error" message after viewing
      I can view the PDF pages from within the Winows Explorer "web browser" but if I try and close the window by using the EXIT, clicking on the X in the...
    3. Why are some files BLUE in Windows Explorer?
      Can anyone help me with this one? Thanks. =)
    4. Explorer Search (F3) find a text/keyword in files is defect in Windows XP SP1 und Windows 2003 Server
      Is this issue known? And do anybody knows, if there is an Microsoft update is available? (no hint in Microsoft Updates) Or do anybody know a real...
    5. program files not letting me see subfolders and files
      I have my winxp computers networking but computer A will not let me open program file folder on computer B. The drive c: is shared and I can view...
  3. #2

    Default Re: Windows Explorer (and FSO) doesn't know how to reliably count files and subfolders - other options?

    It's extremely odd that in the current Windows o/s that there isn't a
    trustworthy way of getting an accurate count of the files and subfolders in
    a parent folder.

    Michael.

    "nikos" <umeca74@hotmail.com> wrote in message
    news:%23Y5lEANSEHA.556@TK2MSFTNGP10.phx.gbl...
    > "Michael Herman (Parallelspace)" <mwherman@parallelspace.net.no#$#spam>
    > wrote in message news:Ozw2NkyREHA.1392@TK2MSFTNGP09.phx.gbl...
    > > The folder properties dialog in Windows Explorer and the FileSystem
    object
    > > both on a Windows Server 2003 system doesn't provide accurate counts of
    > the
    > > number of files and subfolders in a parent folder.
    > >
    > > This is a huge suprise to me that the Windows Explorer folder properties
    > > dialog is unreliable.
    > >
    > > When the length of a file path is at or near the maximum length of 248
    for
    > > the file path and 260 for the fully qualified path name, Windows
    Explorer
    > > produces a garbage number that can be off by thousands of files.
    > >
    >
    > as always, a simple workaround is to use FindFirst/Next but using the 8.3
    > version of the pathnames so that you never exceed the 260 chars limit
    >
    > GetShortPathName may help but itself has a limit of 260 chars, so you may
    > need to write your own
    >
    > ---
    > [url]www.netez.com/2xExplorer[/url]
    >
    >

    Michael Herman \(Parallelspace\) Guest

  4. #3

    Default Re: Windows Explorer (and FSO) doesn't know how to reliably count files and subfolders - other options?

    robocopy from the Windows Resource Kit appears to be the only Microisoft
    tool that provides a trustworthy count of the files in a hierarchy of a
    parent folder.

    Use the /L option to cause robocopy to run without actually copying
    anything. This is the fastest way to get the stastics produced when
    robocopy finishes.

    Michael.


    "Michael Herman (Parallelspace)" <mwherman@parallelspace.net.no#$#spam>
    wrote in message news:Ozw2NkyREHA.1392@TK2MSFTNGP09.phx.gbl...
    > The folder properties dialog in Windows Explorer and the FileSystem object
    > both on a Windows Server 2003 system doesn't provide accurate counts of
    the
    > number of files and subfolders in a parent folder.
    >
    > This is a huge suprise to me that the Windows Explorer folder properties
    > dialog is unreliable.
    >
    > When the length of a file path is at or near the maximum length of 248 for
    > the file path and 260 for the fully qualified path name, Windows Explorer
    > produces a garbage number that can be off by thousands of files.
    >
    > Same issue with the Filesystem object.
    >
    > What tool can we use to get an *authoritative* count of the number of
    files
    > and subfolders in a parent folder? robocopy is the only utility that
    seems
    > to provide an accurate number.
    >
    >
    > --
    > Michael Herman
    > Parallelspace Corporation
    > Developers of Advanced Business Collaboration Solutions for Microsoft
    > SharePoint, Microsoft Live Communications Server and Groove Workspace
    >
    > Portal and Content Migration Solution Specialists:
    > [url]http://www.parallelspace.net/sharepoint[/url]
    > SharePoint Migration Knowledge Center:
    > [url]http://groups.yahoo.com/group/sharepointmigration[/url]
    >
    >
    >
    >

    Michael Herman \(Parallelspace\) Guest

  5. #4

    Default Re: Windows Explorer (and FSO) doesn't know how to reliably countfiles and subfolders - other options?

    Michael Herman (Parallelspace) wrote:
    > robocopy from the Windows Resource Kit appears to be the only Microisoft
    > tool that provides a trustworthy count of the files in a hierarchy of a
    > parent folder.
    >
    > Use the /L option to cause robocopy to run without actually copying
    > anything. This is the fastest way to get the stastics produced when
    > robocopy finishes.
    Hi

    Info and download link for the latest version of robocopy.exe here:

    [url]http://groups.google.com/groups?selm=4036844E.EF9F733A@hydro.com[/url]


    --
    torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    Administration scripting examples and an ONLINE version of
    the 1328 page Scripting Guide:
    [url]http://www.microsoft.com/technet/community/scriptcenter/default.mspx[/url]
    Torgeir Bakken \(MVP\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139