Resolved Question

MAX_PATH limitation is pretty outdated

The MAX_PATH limitation is pretty restricting for current needs. I often needed to organize projects data into paths longer than 260 characters. I can't believe this rather ancient piece is still around. They have had over 15 years to do something about this but haven't done anything to rectify the situation

Example of file path with 408 characters minus 7 slash marks equals 401 characters with (kHappy being the letter of hard drive. This exceeds the basic 260(sometimes listed as 255) character limitation of NTFS ( I know, there is the possibility by using Unicode function that there can be over 32,000 characters - I don't want to get into that, too technical for me.)

(K:)\Files and folders moved from #5 Venus-154GB,53,680fo,780,800fi\Other -10.9gb, 3,205fo, 47,000fi\BU from laptop 8-14-11 6.88GB, 1,751fo,32,539fi\My Documents 6.88GB,1750fo,32,539fi\Travel to Hawaii 1.99MB,53fo,337fi\Lodging 1.98MB,52fo,337fi\Kauai 1.98MB,51fo,337fi\Hawaiian Beach Rentals 1.98MB,50fo,337fi\\1538 Hanalei Bay Resort,Condo Apartment in Princeville,Kauai Princeville condos for rent_files.
OR in outline format:
(kHappy
Files and folders moved from #5 Venus- 154GB,53,680fo,780,800fi
Other - 10.9gb, 3,205fo, 47,000fi\
BU from laptop 8-14-11 6.88GB, 1,751fo,32,539fi\
My Documents 6.88GB,1750fo,32,539fi\
Travel to Hawaii 1.99MB,53fo,337fi\
Lodging 1.98MB,52fo,337fi\
Kauai 1.98MB,51fo,337fi\
Hawaiian 1538 Hanalei Bay Resort,Condo Apartment in Princeville,Kauai Princeville condos for rent_files

I am aware that I can eliminate the folder size, folder numbers and file numbers which would reduce the path considerably. See below
(K:)\Files and folders moved from #5 Venus\Other \BU from laptop \My Documents\Travel to Hawaii\Lodging\Kauai\Hawaiian Beach Rentals\1538 Hanalei Bay Resort,Condo Apartment in Princeville,Kauai Princeville condos for rent_files
This comes to about 220 and would be within the limitation, but I would be losing a lot of information that I would like to have. With the sophistication of computers today it would seem that there should be some simple work around for this. I did find a website that had a program called something like LongPath Tool, but it was a bit "spendy" and I don't know if it would really work like I would like for it too. At the present moment, I am trying to copy LongPath files from one hard drive to another and in some cases I am unable to do so. Does anyone know of any programs that will handle increasing path size beyond the 260 limitation?

Discussion is locked
The ancient one has chosen the best answer to their question. View answer
Follow
Reply to: MAX_PATH limitation is pretty outdated
PLEASE NOTE: Do not post advertisements, offensive materials, profanity, or personal attacks. Please remember to be considerate of other members. If you are new to the CNET Forums, please read our CNET Forums FAQ. All submitted content is subject to our Terms of Use.
Reporting: MAX_PATH limitation is pretty outdated
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Comments

Best Answer

- Collapse -
That max path limit is ...

actually a limitation of the file system, not the OS.

Linux and UNIX have their limitations on path COMPONENTS but you can string the components together until you reach their byte limits.

Microsoft's Windows with its NTFS and FAT32 opted for a difference but actually fo your specific complaint the solution is really simple, just use the 8.3 short file name.

for instance the following:
Files and folders moved from #5 Venus- 154GB,53,680fo,780,800fi this is FILESA~1 when reduced to its 8.3 name

Other - 10.9gb, 3,205fo, 47,000fi\ This and the next 5 cannot be shortened because it is an illegal file or directory name because a file or directory name cannot contain the \ I will assume the actual directory name does not include the slash and remove it and proceed

Other - 10.9gb, 3,205fo, 47,000fi this is OTHER-~1.9GB when reduced to its 8.3 name
BU from laptop 8-14-11 6.88GB, 1,751fo,32,539fi this is BUFROM~1.88G when reduced to its 8.3 name
My Documents 6.88GB,1750fo,32,539fi this is MYDOCU~1.88G when reduced to its 8.3 name
Travel to Hawaii 1.99MB,53fo,337fi this is TRAVEL~1.99M when reduced to its 8.3 name
Lodging 1.98MB,52fo,337fi this is LODGIN~1.98M when reduced to its 8.3 name
Kauai 1.98MB,51fo,337fi this is KAUAI1~1.98M when reduced to its 8.3 name
Hawaiian 1538 Hanalei Bay Resort,Condo Apartment in Princeville,Kauai Princeville condos for rent_files and this becomes simply HAWAII~1

NOTE how several of the directories have a three character extension. It will be the LAST period within a file name followed by up to three characters following it

This that you had:

(K:)\Files and folders moved from #5
Venus-154GB,53,680fo,780,800fi\Other -10.9gb, 3,205fo, 47,000fi\BU from
laptop 8-14-11 6.88GB, 1,751fo,32,539fi\My Documents
6.88GB,1750fo,32,539fi\Travel to Hawaii 1.99MB,53fo,337fi\Lodging
1.98MB,52fo,337fi\Kauai 1.98MB,51fo,337fi\Hawaiian Beach Rentals
1.98MB,50fo,337fi\\1538 Hanalei Bay Resort,Condo Apartment in
Princeville,Kauai Princeville condos for rent_files

now reduces to (K:)\FILESA~1\OTHER-~1.9GB\BUFROM~1.88G\MYDOCU~1.88G\TRAVEL~1.99M\LODGIN~1.98M\KAUAI1~1.98M\HAWAII~1 which is well under the 256 character limitation

If you open a command prompt and use the Directory command with the /X switch DIR /X you will see a directory listing showing both short 8.3 and long file names similar to the following:

05-Sep-12 10:26 <DIR> FILESA~1 Files and folders moved from #5Venus- 154GB,53,680fo,780,800fi
05-Sep-12 10:21 <DIR> HAWAII~1 Hawaiian 1538 Hanalei Bay Resort,Condo Apartment in Princeville,Kauai Princeville condos for rent_files
05-Sep-12 10:42 <DIR> OTHER-~1.9GB Other - 10.9gb, 3,205fo, 47,000fi

- Collapse -
Thanks for the info

I have never used the command prompt as such and I assume (assumptions can be dangerous) that I get there by going to Run and type in cmd.exe. Just tried that while I was writing this and I guess the black screen with white writing is the command prompt which ends with > and a blinking _ cursor. Your explanation seems quite clear so I will give this some thought and see what I can do. I am always afraid that I will screw up my computer when I go where this man has never gone before.

- Collapse -
Answer
Which is why when I write apps,

I never rely on the PATH. So that's my cure. Write better apps.
Bob

- Collapse -
Yeah, right

I barely know what an app is let alone know how to write one. I did see when I googled this problem in another forum someone who said he had written his own app and showed what it was, but that was beyond me. Remember I am the ancient one and a thousand years ago when I was in high school, I flunked algebra and then many centuries later when I tried to take a CS class at the local community college, I couldn't get in because my math skills were too low.

- Collapse -
So the workaround.

As you know, each copy of cmd.exe can have it's own path. So with each app you launch you can have a batch file to set the path, then launch the app.

I see you know the other workaround.
Bob

CNET Forums