S
spunkopolis
I have an application that is working on WindowsXP and Windows2000. I
recently moved it onto a new Windows2003 Server Service Pack 2 machine. It is
now getting an error message which reads "The process cannot access the file
<filename> because it is being used by another process"
this is what I have (abreviated version):
If File.Exist(FullPathName) Then
Dim sr As StreamReader = File.OpenText(FullPathName)
Dim sw As StreamWriter = File.CreateText(NewFullPathName)
... do some work
sw.Flush()
sw.Close()
sr.Close()
File.Delete(FullPathName)
File.Move(NewFullPathName, FullPathName)
End If
recently moved it onto a new Windows2003 Server Service Pack 2 machine. It is
now getting an error message which reads "The process cannot access the file
<filename> because it is being used by another process"
this is what I have (abreviated version):
If File.Exist(FullPathName) Then
Dim sr As StreamReader = File.OpenText(FullPathName)
Dim sw As StreamWriter = File.CreateText(NewFullPathName)
... do some work
sw.Flush()
sw.Close()
sr.Close()
File.Delete(FullPathName)
File.Move(NewFullPathName, FullPathName)
End If