Solved

Who else but me?

Posted on 2004-10-01
9
208 Views
Last Modified: 2010-04-14
Ola,

When trying to delte a file I get this msg ( something like it ) "Cant delete file, file in use", even though I am SysAdmin.
How can I tell what process or who is using that file?

And when it is a process I cant kill normally, how do I eradicate that process so that I can delete the file in use anyway and restart my sytems normally :-)

0
Comment
Question by:DaFou
[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
9 Comments
 
LVL 57

Assisted Solution

by:Pete Long
Pete Long earned 100 total points
ID: 12200353
Can’t Delete a File

You need permissions to delete a file are you a member of the Administrators group?
(you need a minimum of {modify} to delete.
**********
1.      Try to take ownership of the file. Right click the file > Select the security Tab
Select properties > Select Advanced > Select Owner
Find the User or group you wish to give ownership to and select > Click apply
Now try and delete the file
http://support.microsoft.com/default.aspx?scid=kb;en-us;268019
**********
2      Is it telling you the filename is too long? Then Delete the file in DOS mode
Start >Run >cmd {enter}
Navigate to the folder the file is in, i.e. if its in c:\folder\anotherfolder\file, type "cd c:\folder\anotherfolder" {enter} The command prompt should change to let you know you are in
the correct directory. Type "dir /x" {enter}
The offending file will be listed like (filena~1.xxx)
Take note of the name and type "del filena~1.xxx" {enter}
**********
3.      Is the file flagged as ‘System’? Start > Run > type CMD >Click OK
Navigate to the folder in which the file resides (i.e. cd c:\folder\folder\ {enter})
Type attrib -r -s -a -h filename.extension {enter}
Del filename.extension {enter}
**********
4.      Is the file in use? If either the OS or another program is using the file you cannot
delete it You can with ZAP Included with the Microsoft SMS 2.0 Resource Guide and the
Microsoft BackOffice Resource Kit 4.5. or you can download it here
http://helpdesk.kixtart.org/KixUtilsTasks.asp
WARNING make sure you know what your deleting first!
**********
5.      If your hard drive is formatted with FAT32 you can boot with a boot disk and Delete
the file from DOS. (del filename.extension) If your hard drive is formatted with NTFS you
can boot with a boot disk and, if you lucky enough to have a copy of NTFSPro from http://www.sysinternals.com/ntw2k/freeware/ntfsdospro.shtml you can boot to DOS mount the
NTFS volumes and delete it from there.
**********

**Other Options**
Use this on the file/folder in question
http://www.jrtwine.com/Products/DelFXPFiles/

Use GiPo@MoveOnBoot
http://www.gibinsoft.net/gipoutils/bin/moveonb.exe
Instructions for use http://www.download-free-games.com/removing_dm_exe.htm

Try using "KillBox" on the file
http://www.broadbandmedic.com/download/VbStuff/TheKillBox.zip

Try using TAKEOWN from the resource kit to force ownership and delete the file
http://www.dynawell.com/support/ResKit/win2k.asp

"Access Denied" When You Delete Folders from a Mounted Drive
http://support.microsoft.com/default.aspx?scid=kb;en-us;243514
0
 
LVL 2

Author Comment

by:DaFou
ID: 12200601
PeteLong,

thx for your input:

1, ok cool
2, no not that. the file name is not too long
3, please tell me more.. how do I tell if a file is system or not?
4, thx alot. That will help alot.. Buit before I start zapping atuff please tell me how do I tell what / who is using the file i am about to zap..
5. no fat.. otherwise I would have no problems..
0
 
LVL 2

Assisted Solution

by:demingj1
demingj1 earned 150 total points
ID: 12200662
pskill (a very small app from sysinternals [i think, maybe winternals]) will kill ANY process from commandline given it's PID.  You can get it's pid from task manager or use the app to kill the process by name matching.  I recommend any sysadmin have this app available, it is very small and free.

try to track down and kill the process that is keeping that "file in use" then you can delete it.
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 2

Author Comment

by:DaFou
ID: 12200856
When searching for *pskill*.* I find nothing.. Please provide additinal info.

And how do I tell what process is keeping what file in use?
0
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 12200936
Use the Process Explorer (http://www.sysinternals.com/ntw2k/freeware/procexp.shtml) to see what application is using that file.
0
 
LVL 2

Assisted Solution

by:demingj1
demingj1 earned 150 total points
ID: 12201290
http://www.sysinternals.com/ntw2k/freeware/pstools.shtml

for the pstools suite, however you only need pskill (and the app mentioned from jkr above to tell which process has the file in use)
0
 

Assisted Solution

by:EFA
EFA earned 50 total points
ID: 12203098
Sorry I didn't read the above. Try to see the administrative tools\computer management\shared folders\open files.
0
 
LVL 2

Author Comment

by:DaFou
ID: 12419763
SOrry I was away on this thread so long. ill try all suggestions this week and by next week i want to have the points asigned
0
 
LVL 2

Author Comment

by:DaFou
ID: 12441863
Hmm imagine a text file blah.txt  
now it is possible for that file to be in use by a process like a editor or something.

When i try to delete that file i get a message stating i cant delete the file becuase it is is use. But i cant see that file in the Task Manager.
I see alot of processes and one of those processes is using that file.. But how do i find out what process it is?

Thats my real problem.
0

Featured Post

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.  

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 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