I keep getting that exception in my program. How do I know which process locked it, either by program code or by doing something with windows?
System.IO.IOExce
You can use a tool like ProcessMon to see what process is locking a file.