topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 2:53 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Path too long utilities supere barrier  (Read 16020 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Path too long utilities supere barrier
« on: October 02, 2012, 05:46 PM »
Path too long utilities supere barrier

I would like to know free utilities to supere the barrier of 256 characters :
Windows Explorer/FAR would fail to delete/copy/rename any pathname longer than 256 characters....

It is possible ?

Best Regards
 :-*

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #1 on: October 02, 2012, 06:02 PM »
It is possible ?
Yes and no.

As I understand it, technically NTFS supports 255 UTF-16 codepoints for each path/file name part, with the NT kernel imposing a total limit of 32767 UTF-16 codepoints for a full file path.

HOWEVER, every standard piece of userland software out there is compiled with the Windows SDK headers and it's MAX_PATH constant of 260 characters - with three characters for the "C:\" (or whatever partition) and one for the NUL terminator, that leaves 256 characters for the full path (and again, a max of 255 for any single part).

While you can theoretically create longer names, expect "everything" to crash and burn, or at least not be able to access the files :)

- carpe noctem

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #2 on: October 02, 2012, 06:16 PM »
But I think exist or seen a lot of utilities for this purpose.
Sometimes goes when the files we received inside folders. We import a organization folder with files inside and we have this problem.
So I would a soft for this purpose. An utility.

Is it possible ?

Best Regards
« Last Edit: October 02, 2012, 06:22 PM by Contro »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #3 on: October 02, 2012, 06:21 PM »
Sometimes goes when the files we received inside folders.
I kind of doubt it - I'm pretty sure explorer has the MAX_PATH limitation as well, and wouldn't be able to browse inside such folders.

It's technically possible, yes, but considering how little software supports such long paths, and how much would break, I can't see it being useful :)
- carpe noctem

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #4 on: October 02, 2012, 06:28 PM »
But there are utilities like this :
http://pathtoodeep.com/

I want a free one.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #5 on: October 02, 2012, 08:42 PM »
This doesn't let you move the files. It only detects paths longer than what you specify in the InputBox:

https://www.donation...ex.php?topic=28359.0

The main culprit is Explorer.  It doesn't like total path longer than 260 chars.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #6 on: October 03, 2012, 01:00 PM »
I #guess# Contro not is asking to be able to handle the too-long-name files other than to be able to rename them.

----------------
pathtoodeep is a weird site. I don't think it has been updated for 1½ year. Are their programs updated? $19 for the basic version may sound okay - but the same application with the lifetime rights to get support and to update-if-any-updates-ever-will-be-available is $419 !!
 :o
-----------------
Long Path Tool Full Version is $37 (+ VAT), no updates, no support.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #7 on: October 03, 2012, 01:36 PM »
To rename a file/folder is accomplished via move. They're synonymous in this context.

You may be able to use a tool to rename the file but unless the total length can be handled by Explorer then you still have problems. IOW, if the path up to the name is close to or greater than 260 chars then even though programs can create file paths much longer, you'll be hobbled when trying to do anything in Explorer. In effect to get around the issue you'd have to alter the directory path by chopping down the length of the directory names. So in effect you have to move the file someplace that doesn't cause Explorer to choke.


Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #8 on: October 03, 2012, 09:51 PM »
Understood.
Then the good application may be that one that locate all the chains whose lenght is > 255 chrs.
A good one for that ?
Then we can manually short that ones.

Really I use syncback to sync folders between my pc's and usually shorten, but I would a solution before I have that problem.....

 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #9 on: October 03, 2012, 09:52 PM »
I have this problem less or more often when decompressed folders sets in an own folder. Sometimes exceeded 255 chrs.

 :P

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #10 on: October 04, 2012, 09:55 AM »
Understood.
Then the good application may be that one that locate all the chains whose lenght is > 255 chrs.
A good one for that ?

Attached is my mod of TLPD.  It accepts length in the range 4 to 32767 chars. At the end, a text file pops up with a report. I just modified the original to use UNC notation so that it could search for longer paths. Also changed the InputBox a bit.  The AutoIt3 source is included.

edit: Please refer all questions about the operation of the program, such as InjectEnvVars() to the original author on SourceForge.  All I did was modify the check() and InputBox routines to accept longer paths. For best results I suggest running my mod with no command line args.  Just enter all info using the dialog boxes. I don't think I tested it using the environment variable injection stuff.


« Last Edit: October 04, 2012, 10:03 AM by MilesAhead »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #11 on: October 04, 2012, 04:57 PM »
Long Path Tool helped me in this situation. http://PathTooDeep.com


I am afraid this is strange publicity. I take the idea from other post in the forum with a "single one" poster.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #12 on: October 04, 2012, 04:58 PM »
Understood.
Then the good application may be that one that locate all the chains whose lenght is > 255 chrs.
A good one for that ?

Attached is my mod of TLPD.  It accepts length in the range 4 to 32767 chars. At the end, a text file pops up with a report. I just modified the original to use UNC notation so that it could search for longer paths. Also changed the InputBox a bit.  The AutoIt3 source is included.

edit: Please refer all questions about the operation of the program, such as InjectEnvVars() to the original author on SourceForge.  All I did was modify the check() and InputBox routines to accept longer paths. For best results I suggest running my mod with no command line args.  Just enter all info using the dialog boxes. I don't think I tested it using the environment variable injection stuff.




Running to try

 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #13 on: October 04, 2012, 06:04 PM »
Nice indeed Miles. Adopted
 :P :Thmbsup:

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #14 on: October 04, 2012, 07:15 PM »
Nice indeed Miles. Adopted
 :P :Thmbsup:

Glad it's helpful. :)

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #15 on: October 12, 2012, 02:07 PM »
Heh, spammer #2 removed from the thread before I could quote it - but still, to keep an account of the pattern:
Actually, People who manage large files and download mostly through the web may find the redacted very useful and very convenient in simplifying file management and file error messages resolution. redacted  is a fast, efficient yet simple software that anyone can use at any time at all. Nice Day..

Interesting that a simple utility like this not only has such an insane price point, but also pay spammers to turf forums. MilesAhead, you really ought to polish up your TPLD mod and get mouser to set up a dedicated page to it and fight those spambags :D
- carpe noctem

katykaty

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 224
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #16 on: October 12, 2012, 03:07 PM »
What's wrong with just setting up a mapped network drive that points deep enough down into the folder structure?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #17 on: October 12, 2012, 03:10 PM »
MilesAhead, you really ought to polish up your TPLD mod and get mouser to set up a dedicated page to it and fight those spambags

Heh heh. Now I feel guilty taking the credit.  The original author on sourceforge did all the work. I just added "\?\" prefix onto the FindFirstFile call.  Windows does have its quirks. I just realized many of my 32 bit unicode programs will write an ini file consisting of only a BOM when run under Wow64 due to quirks in WritePrivateProfileString. Now I'm engaging in the silly exercise of creating a dummy text file, then moving it to the ini file since .txt files seem to be created in ANSI mode.  Win 3.1 is still not dead!

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #18 on: October 13, 2012, 04:46 AM »
What's wrong with just setting up a mapped network drive that points deep enough down into the folder structure?
Probably not possible, at least with the standard commandline tools (since they don't use the \\?\ prefix, and are limited to MAX_PATH).

But if the APIs that subst uses support the \\?\ prefixing, one could make a tool for it. Interesting idea!
- carpe noctem

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #19 on: October 13, 2012, 09:01 AM »
Looks like programs that call CreateFileW and use the prefix can create paths up to 32767. That's probably where things get sticky. Nice long temp file name in a deep folder, and Explorer chokes right away.

CreateFile API


dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #20 on: August 26, 2013, 05:39 AM »
@MilesAhead -
yes !
I know ...
a verrry late reaction indeed.

I just discovered this thread and your modified TLPD...

Just wanted to say thanks!    :Thmbsup:

=


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #21 on: September 07, 2013, 01:33 PM »
@MilesAhead -
yes !
I know ...
a verrry late reaction indeed.

I just discovered this thread and your modified TLPD...

Just wanted to say thanks!    :Thmbsup:

=



You are most welcome.  Glad it's useful to you.  :)

dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #22 on: September 08, 2013, 12:37 AM »
Just a tip, the link to your site on your personal info is not working. www.favessoft.com  does not exist, could not be found. Maybe it is down.
Of course that also counts for the link on http://www.softpedia...esSoft-LLC-8612.html.

Meanwhile, did you consider to create complete path too long tool yourself?
the TLPD gets me a text results only, so I have to check that out and go into the various subfolders, which is a lot of work.

A new tool would show the results above userprovided threashold in a GUI, allowing the users to jump to that folder and shorten the names of the folder and files, etc.

I am using Opus and can do a 'find *.*'  action with advanced option: pathlength more than nnn characters.
From the results I can go to the parent folder, I can do renames, etc.

However,  for non-Opus users, frankly, there is not much around on Internet.


Maybe it is worthwhile to create a similar tool?
Just a suggestion.

=
SnagIt-08092013 073303.png
=

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Path too long utilities supere barrier
« Reply #23 on: September 09, 2013, 09:15 AM »
Thanks for the reminder. I've removed my old web site from my profile.  Currently I cannot do any programming whatever as all I have to use are public library computers.  These things don't let you right click the mouse, never mind use a different browser or download, install and use programming tools.

I'm dead in the water until such time as I can get a machine.  Since I'm currently homeless and have to carry everything I own on my back, I'm looking for a used lightweight laptop I guess. I have no experience with them, but from what others tell me, it's the only feasible platform for software development in my current situation.

As for my program links, I am working with Mouser to create a mirror for downloads.  When that is complete I will supply the links to Softpedia and update any listings they do not have.  As it stands, anything I have on Softpedia they have been kind enough to store and provide downloads via their own links. If you find links that say external mirror that are dead, they will remove them if notified. I see no point in notifying them myself because I'll just be duplicating work as when I have live mirror links I'll be notifying them for each software utility.

Of course the correct approach for dealing with too long path names would be to fix Explorer.  But there's so much legacy code in it I doubt it will ever happen.  There may not be any developers left at MS who remember how the code works to even attempt it.