* Folder/File Path Length

Homeless Posts from the old forum system
Locked
avatar
Tree_Surgeon
Gold
Posts: 16
Joined: 13 Feb 2005 19:26
Family Historian: V6

Folder/File Path Length

Post by Tree_Surgeon » 15 May 2009 18:18

I note that users in both the FHUG and FHU forums have reported problems while upgrading to FH4, which relate to path length.

In answer to a recent enquiry in the FHU forum, another user provided the following technical detail from the Microsoft Developer Network:

'Maximum Path Length:
In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is 'D:' where '' represents the invisible terminating null character for the current system codepage. (The characters are used here for visual clarity and cannot be part of a valid path string.)'

So the maximum permissible path length is 260 characters, of which 256 are a user definable character string.

The original enquirer's problem related to a file with path name: c:documents and settingsownermy documentsfamily historian do not deletePersonal DocumentsCemeteries and GravesKingston CemeteryBurial - Kingston upon Thames Cemetery, Surrey, 1 February 1922 (Esther Georgie Smallpiece).jpg - comprising some 230 characters prior to its migration to her project folder.

Although many users have successfully migrated their many folders and files to new project folders, I suspect that there are now some new path lengths that are uncomfortably close to the limit, particularly if the files and folders have been migrated to the default Family Historian Projects folder, without the user being aware. The default name adds some 25 characters to the path length and no doubt Sod's Law will ensure that future problems relating this will show up at the most inconvenient time.

For those who may be interested, I list below details of three utilities, each of which provide a simple method of inspecting and editing existing path lengths currently in use on their PCs. All are freeware. Note that each utility has a different path length set by default, but each is easily user customisable.

Long File Path Lister - available at http://www.download.com
Direct URL - http://download.cnet.com/Long-File-Path ... ?tag=mncol

Long Filename Finder - available at http://www.dcsoft.com
Direct URL - http://www.dcsoft.com/products/longff/longff.htm

Cut Long Names - available at http://www.replsoft.com
Direct URL - http://www.replsoft.com/cutlongnames.html

All are also useful for identifying path length problems relating to removable recordable media.

ID:3740

Locked