#1 2018-11-12 07:24

mhussain
Member
Registered: 2018-11-12
Posts: 1

Feature request: Support for long filenames/folder names/long paths

Hello,

In my work, we convert certain kinds of zip packages (including all of the files and folders within) from Linux based systems to a windows system.

This means that we often see long filenames, long folder names, and long paths, that are not supported (by default) in windows.

We usually handle this automatically through an internal proprietary converter program. But sometimes we face bugs, and until they're fixed, we have to do part of the work manually for clients, by shortening these paths/files/folders in many zip packages.

For example, one of the bugs I'm trying to work around manually right now is: our converting program trims long folder names to 128 characters, then keeps a track of the new name to process it at a later stage. But in some of these folders, the last character of these 128 characters is a space, which Windows automatically deletes. Now our program tries to find that folder it renamed and cannot find it because of that space character.

What I have to do is: I unpack the zip package, go to these folders, trim all of them manually, and repack, and pass it again to our converter, to avoid that bug.

I was hoping to use Renamer to do this work, rather than doing it manually (so many folders), but it seems Renamer sees these folders in 8.3 format, which doesn't help in this case. Windows itself sees the long name, and allows me to trim it, even if the resulting paths for files inside the folder are still too long.

Without going into too much details that I myself don't know much about, from what I read a while ago, it seems that there is a way to enable support for long paths in Windows since Windows 7, if I remember correctly. And the reason Microsoft did not enable that by default is for backwards compatibility with legacy software that won't be able to read/write to long paths anyways.

Furthermore, some programs such as 7-zip do support long paths, without changing anything in Windows (Long story short, I keep my windows without long file path support, as a diagnostic, and use 7-zip when I detect them).

I'm hoping that Renamer would gain the capability to read and rename such folders without issues, much like what 7-zip can do, and hopefully give us control in settings so we can turn it off or on as needed.

Thank you very much for your awesome program by the way. Renamer is the only tool I asked a license for at my work, as it is really amazing and very useful for many purposes. I just hope supporting long file paths won't be much work, if you decided to support it.

Thanks again smile

Offline

#2 2018-11-13 08:25

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Feature request: Support for long filenames/folder names/long paths

I have some good news for you!

ReNamer does not support long paths (>260 characters) out of the box yet, but, nonetheless, it is possible to make it process long file paths using the "\\?\" prefix notation, as described in Windows Docs - Naming Files, Paths, and Namespaces - Maximum Path Length Limitation.

For example, if your original long path is:

C:\Very\Long\Path

Then you need to add it to ReNamer as:

\\?\C:\Very\Long\Path

A slight difficulty is adding such long paths to ReNamer, because the standard Add Files and Add Folders dialogs cannot handle the long paths yet. However, you can use Add Paths dialog from the main menu, or Export/Import table options.

Another slight complication is that the built-in validation process will warn you that the file path is too long and that it might contain invalid characters. You will have to ignore these warnings, apply your renaming rules and click "Rename".

Make sure to test on a set of dummy files first, and let us know how it goes.

Offline

#3 2022-03-25 02:12

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Feature request: Support for long filenames/folder names/long paths

den4b wrote:

Another slight complication is that the built-in validation process will warn you that the file path is too long and that it might contain invalid characters. You will have to ignore these warnings, apply your renaming rules and click "Rename".

Validation of the long path specification with "\\?\" prefix was implemented in ReNamer 7.0.0.2 Beta, dated 2019-02-03.

Offline

Board footer

Powered by FluxBB