the following code
file.delete(filedetails)
Dim FileStream As StreamWriter = New StreamWriter(filedetails)
produces this error
The process cannot access the file "D:\data.txt" because it is being
used by another process.
Single user XP sp2 pro environment.
I have tried to sleep the process without success, any ideas would be
appreciated.