Solved

Why am I unable to delete certain files

Posted on 2013-12-09
11
400 Views
Last Modified: 2013-12-24
I have backed up files under my users directory to an external hard drive.  I want to delete these files on the external hard drives but I am getting a message that states that some file names are too big and I am not allowed to delete the files or the directory they are in.  I don't understand why not.  

How can I delete the folders and all of these files from my external hard drive short of doing a reformat?
0
Comment
Question by:WoodrowA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 19

Accepted Solution

by:
helpfinder earned 72 total points
ID: 39707404
if you can move these files/folders from external drive to computer you  can try a trick - create new user account, move it to dekttop of this profile and then delete profile

problem could be related to max 255 characters in NTFS file system - you can try to delete it in linux, boot some Live CD and check that way
0
 
LVL 18

Assisted Solution

by:Steven Harris
Steven Harris earned 143 total points
ID: 39707471
Navigate to Computer and right-click on the external drive.  Go to Properties > Security > Advanced and check the owner of the files.  If it set to SYSTEM, or something similar, change the Owner to your local account (COMPUTERNAME\username) and check "Replace owner on subcontainers and objects".

This will force your user account to take full control of the drive and the objects contained on it.

Now try deleting the files/folders.
0
 
LVL 92

Assisted Solution

by:nobus
nobus earned 214 total points
ID: 39708396
0
Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

 
LVL 3

Assisted Solution

by:Detlef001
Detlef001 earned 71 total points
ID: 39708715
Some more searching and I have the solution. Change the owner recipe:

Right-click on folder -> Properties
Security Tab
Click on Advanced button
Owner tab
Edit.. button
select Administrators in 'Change owner to', check 'replace owner on subcontainers and objects'..this might take a while
Open cmd.exe as administrator
type 'cacls l:\messedUpFolder /T /e /g Administrators:f' ...this might take a while
rmdir /S l:\messedUpFolder
0
 

Assisted Solution

by:WoodrowA
WoodrowA earned 0 total points
ID: 39708957
@Nobus
Thank you for responding.

I went to the to the download site but saw many messages about an additional toolbar that gets installed (whether you want it or not).  I fouond a competitive product called Lockhunter 3.1.1.  See
http://www.techspot.com/downloads/4860-lockhunter.html

However, neither of these tools talk about this specific problem (file names being too long).
0
 
LVL 92

Assisted Solution

by:nobus
nobus earned 214 total points
ID: 39709150
then open a cmd prompt as admin
use the command del c:\users\MyName\"my documents\picturesor whatever\file"

in other words- put the long name between double quotes
0
 

Assisted Solution

by:WoodrowA
WoodrowA earned 0 total points
ID: 39709441
@nobus
Thank you for responding.
I appreciate your input but please bear in mind that what I want to do is not just delete a file.  I want to be able to delete folders that contain other folders wherein the path statment is very long. Example:

P:\Data_Backups\Users\Woody_2\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\7U80504H

What I really want to delete is the folder P:\Data_Backups  and all sub folders.  The syntax with quotation marks does not seem to work on folders.  I downloaded Lockhunter and tried it and it too is unable to delete these folders.  Very Frustrating.
0
 
LVL 18

Assisted Solution

by:Steven Harris
Steven Harris earned 143 total points
ID: 39709482
@WoodrowA,

Have you tried taking permissions of the file as suggested in post a39707471?
0
 

Assisted Solution

by:WoodrowA
WoodrowA earned 0 total points
ID: 39709541
@ThinkSpace
Yes, I did try your suggestion and I thought I had responded to it here but there must have been some sort of malfunction because I don't see the response now.  As I remember it, I was already listed as the owner.  My screens didn't seem to match your instructions exactly so I  asked for further clarification.  

However, I have solved the problem.  It was tedious but at least the folders are deleted.  I did it by going to each of the folders that contained long file names and mapping that folder to a drive letter.  Once this was done I was able to delete the folder from the mapped drive.

I appreciate all the input here.  It is surprising to me that this problem exists, but the real question now is how to avoid this in the future.  Obviously I don't want to simply copy my Users directory.  I'll have to think this through.

Thank you to all again.
0
 
LVL 92

Assisted Solution

by:nobus
nobus earned 214 total points
ID: 39710646
try thisd batch file :  
DEL /F /Q /S C:\Directory\*
 for /D %%i in ("C:\Directory\*") do RD /S /Q "%%i"

more info : http://www.techrepublic.com/forums/questions/dos-how-to-delete-all-files-and-subdirectories-in-a-directory/
0
 

Author Closing Comment

by:WoodrowA
ID: 39737640
Thank you
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

With the recent demise of Windows XP support, you may be a new convert to Windows 7 or Windows 8. Or perhaps you've been on W7 or W8 for a while, but just recently acquired your first scanner for the new OS. In either case, you are likely to be very…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question