There are 2 suggestions:
1. Run any files with long paths on NETWORK DRIVES (for example, "\\NAS\Very\Long\Fullpath\...\More\Than\259\Symbols\file.docx")
As an example: so that when you try to launch using ENTER, Total Commander would automatically suggest copying the file under the cursor to a temporary directory (%temp%) with possible renaming of the file in 8.3 format (if the path+name in %temp% is also >259 characters, that is, a long file name - about 255 characters) for its successful opening. With subsequent deletion after closing (as when starting file from an archive).
2. Transferring Long UNC names to plugins when the path length is exceeded. Some plugins (For example, Ulister) successfully display the contents of files over long paths (even on network drives), but most other plugins cannot do this. I don’t know how Ulister works with long paths, but most likely the path is recognized: if local, then “\\?\” is added to the full path, and if network, then “\\?\UNC\”. Is it possible to make sure that when passing the full path of the file under the cursor to the plugin, a path with such a prefix is immediately formed (you can specify it with an additional operator in the detection string).
Improved support for Long paths
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Improved support for Long paths
Working with long paths is definitely a problem. Instead of copying, it's better to use hardlinks for one volume or symlinks for another. As for prefixes, I'm not sure that this will solve the general problem of plugins, since the API functions that a particular plugin works with may not support them.
Overquoting is evil! 👎
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Improved support for Long paths
Hardlinks are not suitable due to limitations: they can be created within the same volume and can only be created to a file, not to a folder.
Symbolic links - as an option, I think, you can use. But again, you need to define some kind of directory for such links.
For myself, I have solved the problem with the "subst" command. I wrote a VBS script that creates a virtual disk with the current directory, thereby cutting the long path almost to zero. On such a virtual disk, all restrictions on the path length are removed, and working with files is no different from if I were actually working with them in a folder with a long path.
Now I would like to automate this process using "View Mode" and "Auto Switch Mode".
With the help of "View Mode" I use the Filex plugin - check by fullpath length >259 and make the corresponding coloring of files/folders. Here is a proposal to the Author - to make a built-in item in "tc" user columns - "full path length", and also along the way "file name length", "path length".
Unfortunately, in "Auto Switch Mode" it is currently impossible to create a rule that uses a plugin or other criteria by path length. Hence the second wish to the author - to add a rule in "Auto Switch Mode" that uses a certain output of any selected plugin or "tc" columns.
Ultimately, I want the TC user not to notice any such limitations at all - working in a folder with a long path is the same as working with a short one. That's what distinguishes Total Commander from Explorer, that any Windows limitations are no obstacle for it.
Symbolic links - as an option, I think, you can use. But again, you need to define some kind of directory for such links.
For myself, I have solved the problem with the "subst" command. I wrote a VBS script that creates a virtual disk with the current directory, thereby cutting the long path almost to zero. On such a virtual disk, all restrictions on the path length are removed, and working with files is no different from if I were actually working with them in a folder with a long path.
Now I would like to automate this process using "View Mode" and "Auto Switch Mode".
With the help of "View Mode" I use the Filex plugin - check by fullpath length >259 and make the corresponding coloring of files/folders. Here is a proposal to the Author - to make a built-in item in "tc" user columns - "full path length", and also along the way "file name length", "path length".
Unfortunately, in "Auto Switch Mode" it is currently impossible to create a rule that uses a plugin or other criteria by path length. Hence the second wish to the author - to add a rule in "Auto Switch Mode" that uses a certain output of any selected plugin or "tc" columns.
Ultimately, I want the TC user not to notice any such limitations at all - working in a folder with a long path is the same as working with a short one. That's what distinguishes Total Commander from Explorer, that any Windows limitations are no obstacle for it.
Re: Improved support for Long paths
I wrote about it right away. It is very easy to beat the condition by checking the difference of the drive letters and the object type. Symlinks are not supported on XP, so it's better to do both.
Good idea. Although you can control this in the script itself, executed in this way through em_ command. You can even register a command via Autorun that will perform a custom function with subst.monarch-lfv wrote: 2024-11-03, 21:58 UTC Unfortunately, in "Auto Switch Mode" it is currently impossible to create a rule that uses a plugin or other criteria by path length. Hence the second wish to the author - to add a rule in "Auto Switch Mode" that uses a certain output of any selected plugin or "tc" columns.
But for other programs used, this is still an obstacle. But for plugins, something can be partially solved, I think.monarch-lfv wrote: 2024-11-03, 21:58 UTC Ultimately, I want the TC user not to notice any such limitations at all - working in a folder with a long path is the same as working with a short one. That's what distinguishes Total Commander from Explorer, that any Windows limitations are no obstacle for it.
Overquoting is evil! 👎