Ezzy
Ezzy

Reputation: 1483

Close handle that is reading my file

When I try to delete a file it can sometimes be open in another program. How do I detect which program has my file opened and how do I close their handle to my program to allow me to delete my file?

Upvotes: 0

Views: 176

Answers (2)

Avraham Shalev
Avraham Shalev

Reputation: 180

You can use Sysinternals suite's ProcExp.

download from here.

CTRL+F to search for the file handle..and right click + close handle to close it.

make sure to run ProcExp as an Administrator!

Upvotes: 1

Erik Alapää
Erik Alapää

Reputation: 2703

If in Linux or on a Mac, use lsof. It can be used to show open files, open sockets, and more - I often use it for network stuff, instead of netstat.

Upvotes: 0

Related Questions