Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Who else but me?

Posted on 2004-10-01
9
Medium Priority
?
212 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
9 Comments
 
LVL 57

Assisted Solution

by:Pete Long
Pete Long earned 400 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 600 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
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
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 800 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 600 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 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Today as you open your Outlook, you witness an error message: “Outlook is using an old copy of your Outlook Data File…”. Probably, Outlook is accessing an old OST file.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

876 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