Following this question: How can I unlock a file that is locked by a process in .NET , how to programmatically get a list of files that are locked in a specific folder and its subfolders?
I am using Windows 2003, .NET 3.5, C # 3.0.
Update: some background ... basically we archive closed websites on a shared server. After deleting the site from IIS, we move the folder structure for the site to the archive, where it was stored for 6 weeks. Although the IIS and FTP site were stopped and deleted, we still encounter locked files during the move. So it would be nice to know that he still has a lock.
source
share