Following up from this question: How can I unlock a file that is locked by a process in .NET, how do I programmatically get a list of files that are locked in a particular folder and its subfolders?
I'm using Windows 2003, .NET 3.5, C# 3.0.
Update: some background... basically we're archiving closed websites on a shared server. After deleting the site from IIS we move the folder structure for the site to an archive where it's held for 6 weeks. Even though the IIS site and FTP has been stopped and deleted we still encounter locked files during the move. So it'd be nice to know upfront what's still got a lock on it.