The explorer exe file name specified is too long. File name or source path too long
Here is an example of a folder structure that I called the “big doll”:
As you can see, on drive “D” (Data) there is a source video folder, in it there is a “Movies” folder, in it there is “Everything you need to watch movies” and then in the same way a folder within a folder. At the same time, many folders have long names and names - more than 10-15 characters, which in total will give the volume of characters in all names more than 260. And if at the end of such a “matryoshka” there is a file, then it may turn out that you cannot work with it you can... Sometimes the system itself does not allow you to ultimately create a folder or file that exceeds the allowed number of characters, but sometimes for some reason this happens.
First, for beginners, I’ll explain what a file and folder path is. The path is the so-called address on the computer where the file or folder is located. For example, a file called “My file.txt” is located on the local drive D: in the “Documents” folder. Then the path to this file will look like this:
D:\Documents\My file.txt
Or, for example, this is what the path from the example above will look like, where I showed a complex folder structure.
As you can see, the number of characters in the path above is large and it is possible that at the end there will be a file or folder with a long name that you cannot delete.
When you try to delete a file with a long path name, you will receive a window with an error like this:
I tried to artificially recreate the problem and this is what I got.
On drive “D” I created a folder short name“1” and placed a file with a very long name in it. Here's an example:
Now I also rename that folder “1” to some very long name, for example:
Interestingly, Windows freely allows you to rename a folder to such a long name, despite the fact that the number of characters in the name of this folder + file name already exceeds 260! Well, after renaming the folder to a long name, I can no longer delete the file located in it and get the error shown.
Or here’s another example... I maintain the website of the Moscow Instrument-Making College, where I previously worked full-time, and sometimes I use a copy of the site on my computer to test some new “goodies” for the site. What if I install something bad and the website on the hosting dies? :) And so I check it on my computer and if everything is in order, then I set it up on a real website located on the hosting. So, one time I transferred the entire site from hosting to test one thing, and after I finished working, I decided to delete the folder with the site from my computer. After all, it weighs about 6 GB. The entire site was deleted, except for a number of folders. I started looking and saw that those folders that contained a file with a long name in the form of hieroglyphs were not deleted:
I tried to delete this file with a long name again and saw the same error that I mentioned above. I tried to rename it, but it doesn't work either. Well, I had to think about how to solve the problem.
How to solve the problem of deleting a folder/file with a long path name!
I tried 2 ways to delete a folder/file with a long name in the path to it. Both of them are not technically difficult (especially the 1st), so I think a beginner can handle it if he does everything exactly as I show:
Rename multiple folders in a file path to more short name. This is the simplest solution that should already help many! Suppose you have a file in a folder with a very long name that you cannot delete, open, copy, and generally cannot work with.
Then try simply renaming the folder in which the file with a long name is located, for example, to “1”. Let me return to one of the examples above. Here is a folder with a long name:
Rename using standard explorer Windows title that folder in “1” and this is what the file path now looks like:
Now you can safely work with the file, the system will allow you to open it, rename it and delete it.
If you have a long folder tree, i.e. like a nesting doll, in one folder there is another, in it there is another, then another, then start renaming from the very first folder from this nesting doll. Not with the last one on the list, but with the first one!
It may be that there are a huge number of folders and you won’t be able to rename some of them due to the same error or it will take you a lot of time. In this case, I suggest the second method.
The method is that you can take some folder, for example, in the middle of a common tree and connect it as a virtual disk. A virtual disk is something that reminds us of a regular one. local disk, but which is simply tied to a specific folder, for example, for quick interaction with it.
Let's say you have a long path like this:
D:\Video\My Movies\Everything you need to watch movies\Programs for watching movies\How to open MP4 movies\List of MP4 example movies\List of programs for opening MP4\What not to do when opening MP4 files
Let's assume that in the very last folder we have some kind of problematic file that we cannot work with, since the path to it, as we see, is quite long :)
We can take and connect one of the folders with a long name in the middle of the path as a virtual disk. Let this be the “Programs for watching movies” folder.
To connect a virtual disk, we need the so-called Windows command line, i.e. console.
You can open it via Windows search. In the search, type “Command Line”:
In the window command line we need to type the command:
subst virtual_disk_letter "path_to_folder"
You can put any drive letter, as long as it is not already occupied by one of local disks. For example, you have local drive C and D, which means virtual disk you will no longer be able to call it with the same letter. You can call it, for example, the letter “X”, because it is rarely used in Windows.
For the folder path, you insert the path to the folder that you want to connect as a virtual one. As I already said, in my example we’ll make “Programs for watching movies” as a virtual folder, which means the path needs to be specified like this:
D:\Video\My Movies\Everything you need to watch movies\Programs for watching movies\
So, the final command in my case will look like this:
subst X: “D:\Video\My Movies\Everything you need to watch movies\Programs for watching movies\”
To execute the entered command, press the “Enter” key on the keyboard. The virtual disk will be created.
Now let's move on to Windows Explorer, go to the “This computer” (or “Computer”) section and see the virtual disk created there:
You can distinguish it by its letter. I assigned the letter "X" to the virtual disk. Now if we open this virtual disk, we will immediately find ourselves in the “Programs for watching movies” folder. Those. we took and cut off half the path to the final folder.
For comparison...
Previously, the path to the final folder looked like this:
D:\Video\My Movies\Everything you need to watch movies\Programs for watching movies\How to open MP4 movies\List of MP4 example movies\List of programs for opening MP4\What not to do when opening MP4 files
After connecting the virtual disk to the “Programs for watching movies” folder, the path to the final folder looks like this:
X:\How to open MP4 movies\List of MP4 example films\List of programs for opening MP4\What not to do when opening MP4 files
Do you feel the difference? The path is shortened by half, since the drive letter immediately directs us to the folder in the middle of the path :) And since the path is greatly shortened, you probably now have removed the character limit in the names of files and folders and will be able to delete a file or folder with a long name!
After you solve the problem with the file, the virtual disk can be deleted again so that it does not become an eyesore in Explorer.
To do this, open the command prompt again Windows string and enter the command:
Subst virtual_disk_letter /d
In my case the drive letter is “X”, so the command will look like this:
When I was thinking about options for solving the problem, how to delete a folder or file with a long name, I found another option on the Internet: delete the problematic file through the program “ Total Commander" I tried it, it didn’t work out, that’s why I didn’t recommend this method :)) And the method, even if it would work for someone, is honestly not fun, because you have to install additional program to your computer for the sake of deleting just one file or folder with a long name...
I think that if a similar problem occurs, which I have had more than once, one of the methods described above will definitely help you.
That's all! See you soon in the next articles;)
The title turned out to be long, but it indicates the essence of the problem that will be described here. Recently I encountered a not very good situation. While sorting the hard drive and clearing it of unnecessary things, I discovered that one of the files was not deleted, but the following error appeared: “The file system does not support such long source file names. Try moving the file to a folder with a shorter path length or specify a shorter file name and try again."
Not only could I not delete the file, but I also could not change the name to a shorter name. For many, this would seem like a dead end, because it turns out that the file is not deleted.In fact, the problem can be solved very simply and quickly, and now I will describe two methods for solving it, and it’s up to you to decide which one to use.
What to do if the path to the source is too long, how to delete such a file?
If you have a file that is not deleted due to a long name, there are several options to solve the problem. For example, a file is nested in several directories, say five or even ten folders that have names of 10-20 characters, then this may be the reason for not deleting the file. The fact is that Windows does not support any files whose names exceed 260 characters. If this limit is exceeded, the error that I showed above will appear. The number of folders with their own names and the file name itself should total less than 260 characters. The system also has one feature - if this limit is exceeded, we can still rename folders. This means that you need to rename all folders to a short name, for example, a letter or number.
This problem may arise not only because you gave such a long name. This happened to me when I decided to download website files from the server and do something. Since the files were no longer needed, I deleted the entire directory with the site files, but as it turned out, it contained a file with a very long name, plus folder names, and this did not allow me to delete it all.
Method two will help if the first one failed. The fact is that not all folders leading to a file with a long name can be renamed and the same file system error will occur. Then you can create a virtual disk using any of the subfolders leading to the non-deletable file. Now I'll show you how to do this.
Open the command line. To do this, press the Win+R combination and enter the command cmd. You can right-click on the Start menu (or the Win+X key combination) and select Command Prompt there.
Now you write a command that will create a virtual disk for us:
You need to select a drive letter that is not occupied by others. System partition Usually the letters C are indicated, and the second section is indicated as D or E, then choose any other.
The path to the folder must be specified from the disk. If this is difficult for you, then open the folder that will act as a virtual disk and copy the path to it in Explorer at the top.
My command looks like this:
When we go to My Computer, you should see a drive there with the letter that we assigned to it from the command line. Thus, the path to the file will be reduced by almost half, which means that the total length of characters can be less than 260 characters. Now you can try to get rid of the undeletable.
In order to delete a virtual disk you need to enter the command:
substDiskLetter/d |
Using Total Commander
On the Internet, I discovered a method that allows you to delete files that cannot be deleted using . Of course, the downside here is that you will have to install additional software on your computer, and not everyone will want to do this. In any case, I’ll leave this method here in case anyone wants to use it.
Download and install the program. Let's go to the tab "File" click on the section "Change attributes". A window appears where we remove the checkmarks from all attributes. If there is no checkmark next to the item at the top "Process directory contents"- choose. Now from the same program we try to delete a file with a long name.
We use the 7-Zip archiver
For this task we will need a 7-Zip archiver. Right-click on the starting directory and point the mouse at the partition "7-Zip" and select the item "Add to archive".
A window appears in which you only need to check one box. "Delete files after compression". Then click OK.
An archive of all this stuff is created on the desktop, and folders with long file are simply deleted. You can delete the archive itself without any problems.
These are the ways we have looked at to fix the file not being deleted error. Maybe you have other options on how to do this?
Harmful operating room Windows system Doesn't let you delete the file and shouts that it has “The source path is too long”? In this article I will tell you how to easily and simply, without any programs, defeat this scourge by shortening the file name.
The path to the source is too long - why?
I would like to explain right away why such a system warning appears and it is not possible to perform basic copying or deleting actions on a file (folder)…
The notification itself contains the answer to this question - file system Windows does not support (does not understand) source file names longer than 255 characters.
But your file or folder name is short, for example, “Vacation Photos”? The fact is that the “stupid” system perceives the entire path to the file as its name. If your file or folder is located somewhere too deep in file manager, then his name for her will look something like this...
So the name symbols are collected into a gang of more than 255 pieces.
How to delete a non-deletable file or folder in this case? It’s very simple - you need to shorten the file name (path) by renaming nested folders.
How to delete a file with a long name
I’ll show you with my example how to delete a file with a long name which, as the system writes, has too long a path to the source.
Yesterday I decided clean your computer from the old ones backup copies site, but they did not want to be deleted. As you guessed, a warning appeared about the path to the source being too long...
Starting from the very first folder in this long path, I renamed several things...
...and tried again to get rid of the file with a now shorter name - it safely went to the land of deleted files.
Naturally, the new file (folder) name should consist of one character or number, as in my example.
This is how the problem of deleting files or folders with a long name is easily solved. This is not the only method of course. Can special programs delete or through the registry - I just showed manual method. For some it will take just a minute, for others it will take half an hour - it’s up to you to decide how to shorten the file name and the too long path to the source.
Until new useful tips and interesting computer programs.