I am facing an issue in the process of porting code from a Linux (Ubuntu LTS 12.4) environment to Windows Server 2008.
I n
The error message says it all. Windows can't delete or rename an open file like any Unix can, and you're opening workFile and then immediately trying to rename it. You'll have to close the stream first.
workFile