Whenever you create a file in windows with a long file name(more the 255 characters) you risk losing that file and data forever. Since windows can not safely copy, move or even delete these files!
First a bit of history. Over 30 years ago when Microsoft created the 2nd version of the FAT file system it was only able to handle files and paths that were only 255 characters long. Today we are still stuck with that limitation.
Over time Microsoft has done massive changes to the File systems. The introduction of NTFS in 1993 removed these limitations, well sort of.
The problem was that Microsoft hasn’t updated it’s OS or Tools to correctly handle these long file names in the past 23 years.
So 23 YEARS later we still run the risk of losing all our data if any file path should exceed 255 characters. This is because the underlying Microsoft tools can’t use long file paths and simple file operations such as file copy or deleting files!
This affects the following Microsoft tools
I call it a bug, since the problems been known for 23+ years but still to this day Microsoft has made no effort to fix the issue (simple fix’s) and keep your data safe.
So the crazy bit is that Microsoft has had the ability to work around these limitations built into the OS for 23+ years. They just have chosen not to update any of their tools to use these new ability’s.
Even their more modern products like OneDrive and Powershell are still affected by this bug. I can’t understand why they still choose to write their modern tools in this way, with the same limitations, as everything is built into the OS. It’s just pure madness.
To avoid this problem keep your file paths under 255 characters.
Fingers crossed Microsoft will fix these issues and take steps to keep our data safe.
Microsoft have updated their .Net api to have long file support by default!! .Net 4.6.2
Windows 10 anniversary Update
The file explorer still can’t delete folders with long file paths but since you can now install a Linux Bash Shell on Windows 10, you can use Linux to delete, copy and move folders with long filename in Windows 10. That’s crazy!!!