XXCOPY
[ Back to Table of Contents ] [ << ] [ >> ]

XXCOPY TECHNICAL BULLETIN #47


From:    Kan Yabumoto           tech@xxcopy.com
To:      XXCOPY user
Subject: The Very Long Pathname Support
Date:    2009-11-15
===============================================================================

Introduction:

    The official limit in the full length of a path in the Windows API
    has always been 259 characters.  In our estimation, this limit will
    not go away anytime soon.  That's because it is virtually cast
    in stone as MAX_PATH which is a familiar constant to all Windows
    programmers (the constant is equated to 260 that accommodates the
    string-terminating null character).  In the case of a FAT volume
    (FAT12, FAT16, or FAT32), the 259-character limit will live forever.


The NTFS File System:

    Irrespective of the ground rule in the official Win32 API world,
    the Microsoft designers gave the all-inclusive NTFS file system
    a larger limit for the path length than what the Win32 API allows.
    An NTFS volume has the capability of support a path length up to
    32767 characters.

    This foresight is greatly appreciated by those who are responsible
    in backing up the directories and files created by end users some
    of whom have no understanding of limits on things in computers.
    In order to manage backup directories in an orderly fashion, a backup
    administrator often needs a few extra levels of subdirectories in
    the backup directory that sometimes make the total path length exceed
    the 259 character limit.

     -------------------------------------------------------------------
      Note that the maximum path length is different from the maximum
      length for the name of a file or directory that is 255 characters.
      This limit must be observed even when the total path length can
      be extended beyond the official limit of 259 characters.
     -------------------------------------------------------------------

Support of Very Long Path:

    The default behavior of XXCOPY with respect to the total path length
    is to adhere to the official Win32 maximum path limit (259 characters).

    When XXCOPY encounters a path length that exceeds the limit, it will
    issue a warning message that states that a exccessively long path is
    encountered and treat the operation a failure before further action.


Increasing the Path Length Limit:

    With XXCOPY-Pro, you may extend the maximum length of the pathname
    to be supported using the /VL switch.  The switch may accept an
    optional parameter.

        /VL0        // maximum pathname length = 259 (default) 
        /VL         // maximum pathname length = 32767  (the absolute limit) 
        /VL<n>      // maximum pathname length = n character

        You may specify a value between 1 - 32767 for the customized maximum
        pathname length that replaces the default value of 259 characters.


Suppressing the warning message:

    You may suppress the warning message of excessive path length by adding
    a /WL0 switch in the command line (the default setting is /WL that enables
    the warning message).



© Copyright 2016 Pixelab All rights reserved.

[ XXCOPY Home ] [ Table of Contents ] [ << ] [ >> ]

Join the XXCOPY group