Deleting files that give an error of “The filename or extension is too long”

del 0-Namespace-https???next-services.apps.microsoft.com?browse?6.2.9200-1?670?en-US?c?AU?Namespace?pc?00000000-0000-0000-0000-000000000000?00000000-0000-0000-0000-000000000000.dat
The filename or extension is too long.

Cleaning up after a Windows 8 restore and had problems deleting some files. According to KB320081 one possible way was to “Use an auto-generated 8.3 name to access the file”. After some searching I found what this means thanks to this post (it annoys me to no end that lot’s of posts just copy and pasted the details in the KB320081 page and don’t explain how to use the 8.3 name for deleting stuff). So the 8.3 name is the first 6 letters of the file name appended with a ~1 with any similar files will have an incremented number (~2, ~3, etc) as shown below.

1. My Chicagotech A.doc => MYchic~1.DOC
2. My Chicagotech B.doc => MYchic~2.DOC

I used this to help delete some files but even that didn’t manage to delete some files. In the end a “del name*” helped

C:\Windows.old\Users\Tim\AppData\Local\Packages\WinStore_cw5n1h2txyewy\AC\Microsoft\Windows Store\Cache>dir
 Volume in drive C is Windows8

 Directory of C:\Windows.old\Users\Tim\AppData\Local\Packages\WinStore_cw5n1h2txyewy\AC\Microsoft\Windows Store\Cache

13/Apr/2014 16:09 <DIR> .
13/Apr/2014 16:09 <DIR> ..
01/Nov/2013 21:35 5,578 0-Namespace-https???next-services.apps.microsoft.com?browse?6.2.9200-1?670?en-US?c?AU?Namespace?pc?00000000-0000-0000-0000-000000000000?00000000-0000-0000-0000-000000000000.dat
28/Oct/2013 13:04 5,578 0-Namespace-https???next-services.apps.microsoft.com?browse?6.2.9200-1?670?en-US?c?GB?Namespace?pc?00000000-0000-0000-0000-000000000000?00000000-0000-0000-0000-000000000000.dat
27/Oct/2013 18:42 5,574 0-Namespace-https???services.apps.microsoft.com?browse?6.2.9200-1?615?en-GB.en-US?c?GB?Namespace?pc?00000000-0000-0000-0000-000000000000?00000000-0000-0000-0000-000000000000.dat
01/Nov/2013 21:35 474 0-ProductTileExtendedByProductGuidForOS-https???next-services.apps.microsoft.com?browse?6.2.9200-1?670?en-US_en-US.en?c?AU?OsUpgrade?0a295e4d-5f14-4b44-9c2e-c98177f9e2f4?pt?x64.dat

del 0-Prod~1.dat   # worked

del 0-Name~1.dat   # didn't work
Could Not Find C:\Windows.old\Users\Tim\AppData\Local\Packages\WinStore_cw5n1h2txyewy\AC\Microsoft\Windows Store\Cache-Name~1.dat

del 0-Name*        # worked
Advertisement

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.