In windows file naming system, the complete file name cannot or path exceeds 259 characters, this includes the folder path file name and file extension. If it exceeds and you try to delete it, you will receive this error.
“The file name(s) would be too long for the destination folder, you can shorten the file name and try again, or try a location that has shorter path”.
Maximum Path Length Limitation: In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character.
In this case, when you opened its location and tried to delete or rename the file. you don’t get the option to choose either.
Now, you can try 4 options one by one to delete this file.
Please follow the below instructions.
- Try to move the file on some other drive on shorter path.
- If 1st option does not work then restart the machine, In some case restart can solve your problem.
- In 3rd option, you can install “7 Zip” compression utility and then open the file on 7 Zip manager and try to delete. It will solve your problem and if you don’t want to install 7-Zip compression utility, please apply 4th option.
- 4. Go to command prompt and use the command “subst k: [full long path of the folder where the file exists which you want to delete]” and then enter. It will shorten your path and create virtual disk named K drive then you can open the path in k drive and delete the file from there.
This simple trick work 100% and I hope it will helps you.