Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: The filename or extension is too long?

03 Jan 2010   #1

Windows 7 Enterprise (64-bit)
The filename or extension is too long?

I'm trying to delete something I recovered off the HD, and now I can't delete it. I can't rename, delete, cut, copy, anything. I've seen people say do it from CLI like abbreviating such as "del filename~1.txt" or whatever t he extension is... but even that gives the error saying its too long. anyone know how to forcefully delete a file if its name is too long?

My System SpecsSystem Spec
03 Jan 2010   #2
PooMan UK

Windows 7 Ultimate 64bit

My System SpecsSystem Spec
03 Jan 2010   #3
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8

My System SpecsSystem Spec

03 Jan 2010   #4

Win 7 Ultimate 32bit

This is a path length type error.

The best way to do this is by mapping a drive to the deepest folder...

In explorer Find Map Network Drive
Select a drive letter
Browse to the folder location with the file in it
Uncheck the box about reconnect at login and click OK
You should now be able to open that folder from the drive letter in Explorer and delete the files.

You may have to rename the file if the file name is still too long, but you should be able to from this point. Give it a 1 charicter name and that should allow you to delete it.

TakeOwn probably will not work as this is most likely not a Permissions issue.
My System SpecsSystem Spec
04 Jan 2010   #5

Windows 7 Enterprise (64-bit)

oh what the hell? I'm subscribed and I just got notifications... sorry for the late response..
I tried that link earlier and it just kept telling me I didn't have a file it folder selected. ill try to map it when I wake up in the morning. thanks. sorry about the late response. my notification came in late for some reason lol
My System SpecsSystem Spec
16 Feb 2011   #6

Windows 7 Home Premium 64bit
Old thread, but it fixed my problem

I had this exact problem trying to delete some bookmarks.

Tepid's suggestion to map the folder (in this case "favorites") to a drive letter and work with it from there worked.

My System SpecsSystem Spec
17 Feb 2011   #7

Windows 7 Home Premium

Burn Puppy Linux to a CD. Boot to Linux, locate your file and delete it. That was the only thing that worked for me, and I tried everything else.
My System SpecsSystem Spec
17 Feb 2011   #8

Windows 7 Ultimate x64

Most suggestions are on the money, but should they fail to resolve your problem, you might also want to run a disk check to fix possible NTFS errors:
  1. Open Computer
  2. Right-click the drive that you want to check, then click Properties.
  3. Click the Tools tab
  4. Click Check Now (you might need to respond to a UAC prompt)
  5. Make sure the is a checkmark in the Automatically fix file system errors option.
  6. Click Start
My System SpecsSystem Spec
29 Jul 2011   #9

Windows 7 Home Premium Edition (64-bit) Service Pack 1 (Build 7601)

No idea where it came from but I have a folder with about 50 sub-folders - each one called: '-Test', each one is empty.
It will not delete - "The source file name's are larger than is supported by the file system"
I've tried all of the suggestions and many more I've found on the net to no avail.
I've laboriously renamed each of them to a single digit but the problem is not solved. An odd thing here: The deepest folder has no option to rename via the right-click menu. Also, when renaming folders a few levels above the deepest folder another sub-folder gets added (called: "-Test") to the bottom!
I've tried mapping a drive to the deepest file - cures nothing.
I cannot remove or delete the problem folder via the Command Prompt or Robocopy.
I've run chkdsk - no problems but the message: "Windows may not detect all cycles on your volume because the directory structure is too deep" appears.
I've tried moving parts of the problem folder to other areas and then deleting them. That works but there's always just one section left which then mysteriously grows back to 47 sub-folders.
I've run full malware and virus checks to no avail.
The deepest folder is odd in that the right-click menu is missing quite a few entries such as Properties, New, Delete, Rename, Cut, Copy, Send To, etc.
I've tried adding the whole thing to a zipped archive - no go.
Anyone got any further ideas?
My System SpecsSystem Spec
24 Jan 2013   #10

Windows 7 x64 Ultimate
Use Command

Use command prompt..
Navigate to the directory...
use the del command
Dont type the whole file name just use first 3 or 4 alphabets and then put * without space..
For eg if i wanted to delete file named Seveneightnineten
I will type del sev* and then enter.
Assuming you dont another file that starts with sev :)
My System SpecsSystem Spec
Closed Thread

 The filename or extension is too long?

Thread Tools

Similar help and support threads
Thread Forum
filename or extension is too long all over
First time using this forum. So pardon any ignorance. I am getting this error all over the place. I first noticed it when trying to install print drivers. But quickly found it popping up when I try to do pretty much anything. Opening msconfig, admin cmd, etc. I can boot into safe mode and it...
How to use 40 feet long extension cable with Webcam?
Hi, I am looking for your help, I have Microsoft Lifecam VX-5500 (WebCam) I want to adjust this cam on my roof. The distance of my computer to roof is approximately 40 feet. I have 40 feet long USB extension cable but it doesn't work because of USB power supply problem. ( I also know...
Hardware & Devices
Chrome Extension Idea - Extension Bar
I got a idea for a Chrome extension, but no where to request it. When you install extensions in Chrome it places all the extensions to the right side of the address bar. My idea is to have a extension bar below the bookmark bar that automatically hides it's self when the mouse isn't hovering...
Browsers & Mail
Filename extension illusion
The filename below was recieved in a malicious email. It appears to have a .jpg extension but windows will run it as an application. The trick appears to be using left to right then right to left characters so the last 7 characters are "jpg.exe" backwards. I suspect this will dupe a lot of windows...
General Discussion
Long Filename Objects Not Copying - How To Locate
When I copy folders from hdd to ext.hdd (or the reverse), sometimes I get a dialogue informing me that some file's names were too long for the destination. It gives me the option to skip or cancel. What really sux here is that I am not being informed/being provided with a list of what files did not...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:36.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App