what uses my file?

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?
LVL 2
DaFouAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NetworkArchitekCommented:
0
LongbowCommented:
You can use the "net file" command.
"net file id /close" to "close" the file.
"net file /?" for help.
0
anil_uCommented:
Try Who Lock Me on
http://www.dr-hoiby.com/tools.php

works quite well and you can kill the process so that you can delete the file.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

ADSaundersCommented:
Hi DaFou,
Sysinternals provide several admin tools, the one you want here is handle http://www.sysinternals.com/ntw2k/freeware/handle.shtml

Regards .. Alan
0
imnajamCommented:
beside all the tools (that would work for you) you can boot into safe mode and delete the file depending on the file if it's not a critical system file
0
DaFouAuthor Commented:
thanks all for the response.

Before i use any programs not readily installed i want to try
the net file method.
Longbow: How do i determine the file id?
0
LongbowCommented:
It will be given when you type "net file" on the server.
It is the first column.

Maybe you can filter the output with a pipe :
net file | find /I "file.ext"
0
kapesCommented:
net file will be helpful only if its opened over network...

otherwise...

you have to use.. Handle or Process Explorer from Sysinternals.com

Also...

Many times oddly... Ii have found that ... deleting from Command Prompt ... works....
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.