Home > Common Problem > body text

Fixed an issue where file deletion failed due to too long source path

王林
Release: 2023-04-22 12:55:07
forward
3134 people have browsed it

Are you having trouble deleting certain files because your computer keeps showing "The source file name is larger than the size supported by the system. "? For long file names (LFN), Windows only supports file names up to 255 characters. If the file name has more characters than specified, the file cannot be deleted as in File Explorer. You can use two different methods to delete files from your system.

Fixed an issue where file deletion failed due to too long source path

Way 1 – Delete it from Terminal

You must use the Command Prompt Terminal to delete this file.

Know the address of the file you want to delete.

1. Open File Explorer and navigate to the file directory.

2. Once there, click on the address and copy it.

Fixed an issue where file deletion failed due to too long source path

3. Just press the Win key and start writing "cmd".

4. Once you see "Command Prompt" appear in the search results, just right-click on it and click "Run as administrator ".

Fixed an issue where file deletion failed due to too long source path

5. Later, just type this code and paste the location of the file and press Enter to access the location.

cd 文件路径
Copy after login

[

Example - in our case as the path to the file -

C:\Users\Sambit\Music\New Folder\New Folder

Then, the code will be -

cd C:\Users\Sambit\Music\New 文件夹\New 文件夹
Copy after login

]

Fixed an issue where file deletion failed due to too long source path

This will display a list of files and folders for that address. The file you want to delete will be shortened to one word. Now, just write down the name of the file.

6. Now finally, write this line and delete it from the system using the shortened name of the file.

DEL缩短的文件名
Copy after login

[

Example - In our example, the name of the file is "WHYTHI~1.TXT". So, the order is——

DEL WHYTHI~1.TXT
Copy after login

]

Fixed an issue where file deletion failed due to too long source path

That’s all! This is the easiest way to delete files from your system.

Method 2 - Using subst command

There is another way to delete files.

1. Open File Explorer and navigate to the file location.

2. Once there, click on the address and copy it.

Fixed an issue where file deletion failed due to too long source path

Now, close File Explorer.

3. Now, once you have the file location, press the Win key and enter "Command".

4. After that, right-click on “Command Prompt” and click on “Run as administrator”.

Fixed an issue where file deletion failed due to too long source path

#5. When the terminal appears, enter this code and paste the location you copied.

subst z:复制的路径 
Copy after login

[

There should not be any spaces in the path

Example – Paste the copied path into the command. In our case, the command would be -

subst z: C:\Users\Sambit\Music\Newfolder\Newfolder
Copy after login

]

Fixed an issue where file deletion failed due to too long source path

This will map the folder to the folder labeled " z:" new drive.

6. Open File Explorer and you will notice that there is a new drive named " Z: " drive.

7. Just select it and hit the Delete key on your keyboard to delete it from your system.

Fixed an issue where file deletion failed due to too long source path

Now if you want to remove the drive from file explorer just execute the following code-

子 z: /d
Copy after login

Fixed an issue where file deletion failed due to too long source path

This will remove the drive from File Explorer.

Method 3 – Using the 7zip Installer

You can download and use 7zip to delete the folder.

1. Open the 7zip installer on your browser and click "Download".

Fixed an issue where file deletion failed due to too long source path

#2. After that, double-click the downloaded installer file.

Fixed an issue where file deletion failed due to too long source path

3. Now, just click on "Install" to install the package on your system.

Fixed an issue where file deletion failed due to too long source path

关闭安装程序。

4. 现在,从 Windows 搜索框中搜索“ 7zip ”。

5. 点击“ 7zip 文件管理器”。

[

你也可以这样打开——

Windows 开始菜单 > 所有应用 > 7zip > 7zip 文件管理器
Copy after login
]
Copy after login

6. 当文件管理器打开时,导航到要删除的文件的位置。

7. 然后,选择文件并同时按Shift+Delete键以删除文件。

Fixed an issue where file deletion failed due to too long source path

这将确保删除的文件不会进入回收站并被永久删除。

The above is the detailed content of Fixed an issue where file deletion failed due to too long source path. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yundongfang.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template