Solved

Why am I unable to delete certain files

Posted on 2013-12-09
11
401 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

OfficeMate Freezes on login or does not load after login credentials are input.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…

734 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