The files names would be too long for the destination folder - error

Running Microsoft Windows 11 Enterprise, Version 10.0.22621 Build 22621

I am getting ‘The files names would be too long for the destination folder’ error every time I try to transfer files, all PDF, to a Cryptomator Vault. I thought it was a Windows Explorer problem so I used instructions to Remove the 260 Character Path Limit with the Local Group Policy Editor.

I have tried Directory Opus and Double Commander to move the files instead of Explorer, but still the same problem. Or, I am able to move the files from one folder to another and open those transferred files with a PDF viewer from DO, but if I navigate away from that folder and then return, all the files are gone. Weird thing though is that when I copy the files from source to destination, DO tells me that destination already contains these files even though they are not visible. Very similar to this other post in the forum. Wondering if there may be a connection with this post in the forum too.

I have also tried I have tried using Winmerge to move the files, but that didn’t work - well, it appeared to work, and then the files weren’t there. I also tried moving them using explorer.

So not certain whether this is a Windows problem or a Cryptomator problem.

Would appreciate any help on offer. This is starting to turn into a version control nightmare for me. . . . Thanks!

While you are waiting for an answer I just wanted to say that I solved this issue in the past using the free version of this utility (Long Path Tool):

https://longpathtool.com/download/

NOTE: I only use it to scan the folders and detect long paths / long filenames to rename manually. I do NOT use this tool for any automatic process, or even to move or rename anything. I only use it to the scan feature to detect the issues and then rename files or folders to shorten the path manually if needed. For example, you can scan for anything larger than 230 characters (for me that is “close enough” to potentially cause a problem in the future, e.g. if I move or rename something and add a few more characters to the path later. So I rename or move stuff around so that everything is below ~200 characters path preferably.

Thanks for your reply. There appears to be a PR_END_OF_FILE_ERROR with that URL unfortunately. When did you download it? Searched for alternatives but there appear to be similar authentication problems as well as viruses and bloatware. Pity.

I experimented with one folder: I shortened filenames in the source then tried transferring them to destination. No error message, but they don’t appear in the destination folder. I renamed this destination folder, created a new one with the old name then transferred all the shortened file names in the source to this new destination and this worked. I can’t seem to be able to delete the original destination folder though.

It just worked for me, you can try the direct link in case it helps:
https://longpathtool.com/long_path_tool.zip

I scanned it with kaspersky and malwarebytes, it seems to be clean. I have been using it for years without any antivirus complaints. You can scan it on a test computer or you can use the online kaspersky scan before you download it:

Long path tool might be able to help with the deletion you mentioned, but I have NOT tested this feature yet.

I second that. From time to time such tools are posted in threads in this Forum and all were flagged as spam. I do not recommend using such a tool. You can do the same with the terminal. The following powershell snippet lists all directories and files in a directory and its subdirectories which exceed a length of 230:

Get-Childitem -Path "P:\ath\to\my\directory" -Recurse | Where-Object { ($_.BaseName.Length + $_.Extension.Length) -gt 230 } | Format-Table FullName

Replace "P:\ath\to\my\directory" with the directory you want to scan and 230 with the desired threshold.

2 Likes

I agree with the advice of @infeo above, better safe than sorry. I just felt comfortable enough with the safety of this utility to post it here based on the 60+ antivirus / anti-malware scanner results aggregated here:

The risk is that they might not be able to detect very new malware, although this app has been unmodified for a long time.

I was wondering if Infeo’s command can be run on win10 / win11 in powershell, or is it only for linux? It would be great if it can be used on windows.

my snippet is powershell. It would not work in a bash terminal.

1 Like

Are you using drive mount points for your vault? I was able to work around my filename copying issues by using folder mount points instead. If so, perhaps try creating another test vault that is mounted via a folder and try copying the file(s) which had been giving you issues into the test vault .