Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete "The file name is too long." in windows. [Command Prompt] [closed]

How to delete large file path/file name files in Windows. Which is slimier to Linux rm -rf . ?

like image 483
Ashish Dadhich Avatar asked May 20 '17 04:05

Ashish Dadhich


People also ask

How do I force delete a file in command prompt?

How to Force Delete a File With the Windows Command Prompt. The following steps will help you force delete a file with the del command. Step 3: In the Command Prompt, type del , right-click to the paste in the folder address, and append the filename with its extension ( . html , .


1 Answers

To delete The file name is too long. errors files, we've to go for simple steps using default command of Windows robocopy and rmdir.

  1. Create directory mkdir deleteLongFilesDir under C: or D: drive
  2. Suppose D:\Development\Liferay\themes directory contains the files which are not able to delete simply.
  3. run command in command prompt robocopy D:\deleteLongFilesDir D:\Development\Liferay\themes /purge , this command will print some logs and copy you all the files and sub directory of D:\Development\Liferay\themes into deleteLongFilesDir folder virtually, but when you open that directory... hurreeee...It's Empty ???
  4. Now run the command of remove directory which we created for mapping rmdir deleteLongFilesDir from command line.
  5. Now temporary directory has been deleted and same as for D:\Development\Liferay\themes files and folder.
like image 82
Ashish Dadhich Avatar answered Oct 20 '22 06:10

Ashish Dadhich