Site logo

Cannot save “Untitled-1” under a new name. The file “Untitled-1” is damaged (Error code: 0)

Disclaimer: below is just my opinion, and I do not claim to have the ultimate truth.

While testing a complex script on Windows 10, I encountered an issue — saving an indd document with a very long name in a folder with also a very long name resulted in the following error:

Cannot save “Untitled-1” under a new name.
The file “Untitled-1” is damaged (Error code: 0)
.
Error number: 3591

It turned out that the error message doesn’t describe the real reason. In fact, the file wasn’t damaged. It turned out that long names caused the error.

Solution

In the past, before Windows 10, the maximum supported file length was limited to 260 characters (256 usable after the drive characters and termination character). In Windows 10, you can enable long file name support, which allows file names up to 32,767 characters (although you lose a few characters for mandatory characters that are part of the name). This setting is off by default at least on my system: Windows 10 Home Edition, version 1909. (I have an old computer so can’t update).

After enabling it, the problem was gone.

To enable long file name support, do the following:

In the registry editor (regedit.exe) go to
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
and change LongPathsEnabled from 0 to 1. After that, make sure to reboot your computer.

See also: Cannot save document because there are open transactions in process on the database

Back to the Error messages page