How to delete folder with Long Filenames in Windows? Applications

Windows uses Long Filenames (LFN) which supports up to 255 characters. Other operating systems like Mac or Linux does not have similar restrictions. If you try to delete files that are extracted from other OS and exceed ‘windows’ character length, the system will report that the name of the file is too long and cannot be deleted.

Robycopy is an application which is built-in with windows and we can use this command to delete long filenames files and folders. The following steps delete long filenames in Windows OS using Robocopy.

Create a folder in the C drive called DELETE-ME

               MD C:\DELETE-ME

Copy the files/folders that need to be deleted to the DELETE-ME folder using Robocopy and /MIR option

Robocopy C:\DELETE-ME C:\<path>\<top level of the folder to delete> /s /MIR

Long Filenames (LFN)

Then you can simply delete the two remaining empty folders


               rd C:\<path>\<top level folder to delete>

Windows uses Long Filenames

At Velan, our server support engineers can help you deleting long filename files and folders on your server. We troubleshoot problems like these for our clients every day. If you are interested in our service, please fill the Quick connect form to get in touch with us


Quick Connect With Us