file locks (OneDrive)

  • Thread starter Thread starter JeffreyShumaker
  • Start date Start date
J

JeffreyShumaker

Guest
I am using a program that includes an API that allows me to write results to a text file. I then use a basic C# app to move the file from the output directory to a OneDrive directory for that machine/user. Once the file is copied over to the OneDrive directory I attempt to delete the original file that was in the output directory. Occasionally I am getting a file lock error that prevents me from deleting the file. Although when I check TaskManager I am unable to find any program showing that it has the file open. I am also able to manually delete the file, which basically confirms that there isn't a lock on the file.

I searched and was unable to find any C# function that would allow me to force a release of any file locks on a specific file. Any suggestions would be appreciated

Continue reading...
 

Similar threads

S
Replies
0
Views
55
sva0008
S
I
Replies
0
Views
50
It_s Meee
I
C
Replies
0
Views
61
Cas Raj
C
Back
Top