in reply to Re^2: Shorten windows paths too long (trim)
in thread Shorten windows paths too long
Sometimes you "get away with it" and sometimes not! The command line version may use different memory allocation than some other version - this is in any event, "fragile" code that depends upon being lucky!
It appears to me that (a) you have a relatively small number of paths (70), that need to be shorted by a very modest amount - at least 3 chars, but I would try to go more than that for later expansion.
You could build a translation table. Say shortening "persistence-dom" to just "persistD". That alone would solve your immediate problem and get total path characters to less than 255. Throw some other translations in there and you can get to less than 200 chars.
There is a post in this node about "subst" which is one way to implement the "mount point" idea that I suggested earlier, and that is one way to go.
There is also a post that suggests an obvious solution: Don't generate path's with more than 255 chars! Explain to your users why this is important and a big pain in the ass to deal with and they will understand it.
The best solution is that everybody generates stuff that is easy to deal with, understands what the rules are, and why that makes sense. I would counsel you to get out of the file path/name translation business. If you don't, this will be a never ending assignment for you. In short, talk to your users, explain what grief this causes and some simple steps that they can do which eliminates this grief and is better for everybody.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Shorten windows paths too long (trim)
by gj2666 (Beadle) on Aug 18, 2010 at 15:23 UTC | |
by Marshall (Canon) on Aug 19, 2010 at 22:55 UTC |