Windows 10 Quick Tips – Long file names cannot be deleted

After upgrading to Windows 10, I immediately deleted the Windows.old folder using disk cleanup.   This in turn recovered around 20 gigabytes in space on my computer.

I noticed odd file names from previous updates (example:c:\2d51a0107296557123f92939e121) that I could not delete even if I took ownership or gave my user permission (including subdirectories) to delete the information.   Bleachbit failed and so did CCleaner.

Here’s how I got rid of the files –

First go to a command prompt as an administrator.   At the prompt, type –

C:\>cd /d c:\
C:\>dir /ad
C:\>md empty
C:\>robocopy /e /purge /b empty 2d51a0107296557123f92939e121

(Replace 2d51a0107296557123f92939e121 with the folder you want to delete)

You can now delete the folders including the empty folder.

If the folder still does not delete, type the following at a command prompt –

Takeown /F  2d51a0107296557123f92939e121
icacls 2d51a0107296557123f92939e121 /grant administrators:F
rd 2d51a0107296557123f92939e121


About TCAT Shelbyville IT Department

The Tennessee College of Applied Technology - is one of 46 institutions in the Tennessee Board of Regents System, the seventh largest system of higher education in the nation. This system comprises six universities, fourteen community colleges, and twenty-six Applied Technology Colleges.
This entry was posted in Technology, Windows 10 Quick Tips. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s