Fixed an issue where file deletion failed due to too long source path
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.
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.
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 ".
5. Later, just type this code and paste the location of the file and press Enter to access the location.
cd 文件路径
[
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 文件夹
]
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缩短的文件名
[
Example - In our example, the name of the file is "WHYTHI~1.TXT". So, the order is——
DEL WHYTHI~1.TXT
]
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.
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”.
#5. When the terminal appears, enter this code and paste the location you copied.
subst z:复制的路径
[
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
]
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.
Now if you want to remove the drive from file explorer just execute the following code-
子 z: /d
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".
#2. After that, double-click the downloaded installer file.
3. Now, just click on "Install" to install the package on your system.
关闭安装程序。
4. 现在,从 Windows 搜索框中搜索“ 7zip ”。
5. 点击“ 7zip 文件管理器”。
[
你也可以这样打开——
Windows 开始菜单 > 所有应用 > 7zip > 7zip 文件管理器
]
6. 当文件管理器打开时,导航到要删除的文件的位置。
7. 然后,选择文件并同时按Shift+Delete键以删除文件。
这将确保删除的文件不会进入回收站并被永久删除。
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











When logging into iTunesStore using AppleID, this error saying "This AppleID has not been used in iTunesStore" may be thrown on the screen. There are no error messages to worry about, you can fix them by following these solution sets. Fix 1 – Change Shipping Address The main reason why this prompt appears in iTunes Store is that you don’t have the correct address in your AppleID profile. Step 1 – First, open iPhone Settings on your iPhone. Step 2 – AppleID should be on top of all other settings. So, open it. Step 3 – Once there, open the “Payment & Shipping” option. Step 4 – Verify your access using Face ID. step

A Comprehensive Guide to PHP 500 Errors: Causes, Diagnosis, and Fixes During PHP development, we often encounter errors with HTTP status code 500. This error is usually called "500InternalServerError", which means that some unknown errors occurred while processing the request on the server side. In this article, we will explore the common causes of PHP500 errors, how to diagnose them, and how to fix them, and provide specific code examples for reference. Common causes of 1.500 errors 1.

When deleting or decompressing a folder on your computer, sometimes a prompt dialog box "Error 0x80004005: Unspecified Error" will pop up. How should you solve this situation? There are actually many reasons why the error code 0x80004005 is prompted, but most of them are caused by viruses. We can re-register the dll to solve the problem. Below, the editor will explain to you the experience of handling the 0x80004005 error code. Some users are prompted with error code 0X80004005 when using their computers. The 0x80004005 error is mainly caused by the computer not correctly registering certain dynamic link library files, or by a firewall that does not allow HTTPS connections between the computer and the Internet. So how about

A file path is a string used by the operating system to identify and locate a file or folder. In file paths, there are two common symbols separating paths, namely forward slash (/) and backslash (). These two symbols have different uses and meanings in different operating systems. The forward slash (/) is a commonly used path separator in Unix and Linux systems. On these systems, file paths start from the root directory (/) and are separated by forward slashes between each directory. For example, the path /home/user/Docume

1. Press win+r to open the run window, enter [regedit] and press Enter to open the registry editor. 2. In the opened registry editor, click to expand [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun]. In the blank space on the right, right-click and select [New - String Value], and rename it to [systray.exe]. 3. Double-click to open systray.exe, modify its numerical data to [C:WindowsSystem32systray.exe], and click [OK] to save the settings.

Quark Netdisk and Baidu Netdisk are currently the most commonly used Netdisk software for storing files. If you want to save the files in Quark Netdisk to Baidu Netdisk, how do you do it? In this issue, the editor has compiled the tutorial steps for transferring files from Quark Network Disk computer to Baidu Network Disk. Let’s take a look at how to operate it. How to save Quark network disk files to Baidu network disk? To transfer files from Quark Network Disk to Baidu Network Disk, you first need to download the required files from Quark Network Disk, then select the target folder in the Baidu Network Disk client and open it. Then, drag and drop the files downloaded from Quark Cloud Disk into the folder opened by the Baidu Cloud Disk client, or use the upload function to add the files to Baidu Cloud Disk. Make sure to check whether the file was successfully transferred in Baidu Cloud Disk after the upload is completed. That's it

Recently, many netizens have asked the editor, what is the file hiberfil.sys? Can hiberfil.sys take up a lot of C drive space and be deleted? The editor can tell you that the hiberfil.sys file can be deleted. Let’s take a look at the details below. hiberfil.sys is a hidden file in the Windows system and also a system hibernation file. It is usually stored in the root directory of the C drive, and its size is equivalent to the size of the system's installed memory. This file is used when the computer is hibernated and contains the memory data of the current system so that it can be quickly restored to the previous state during recovery. Since its size is equal to the memory capacity, it may take up a larger amount of hard drive space. hiber

Airplane mode is very convenient in some situations. However, the same airplane mode may give you a headache if your iPhone suddenly gets stuck on it. In this article, we have designed this set of solutions to get your iPhone out of airplane mode. Quick fix – 1. Try disabling Airplane Mode directly from Control Center. 2. If you are unable to disable Airplane Mode from Control Center, you can disable Airplane Mode directly from the Settings tab – If these tips don’t work, follow the fixes below to resolve the issue. Fix 1 – Force Restart Your Device The process of force restarting your device is very simple. All you have to do is follow these step-by-step instructions. Step 1 – You can start the process by pressing and releasing the Volume Up button. step