http://blog.dileno.com/archive/201103/fixing-the-file-exists-ioexception-error/
If you get the System.IO.IOException: The file exists
error, it’s probably because your C:/Windows/Temp folder is absolutely full with temporary files. In fact, if you have more than 65535 files in your temp folder, the method GetTempFileName
will throw this error.
To resolve this, just remove all temporary files in C:/Windows/Temp. It might take some time, but it will solve the problem.
Here’s the stack trace I got:
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) System.IO.Path.GetTempFileName()
[…] this, I found plenty of blog posts stating this exception is thrown when there are more than 65535 temp files in the %TEMP% folder, […]
I would recomend not using Path.GetTempFileName() at all. You have no guarantee that this method wil work over time. This is explained in detail in my blog: http://morten.bravonet.no/post/2013/10/07/PathGetTempFileName()-causes-The-file-exists-exception.aspx
Thank you!!!!
Run into this problem in Subtitle Edit. Have a bit of stack trace knowledge from Java so copying the topmost error message led me here.
This trick made it go away so thank you.
If you are running this command under a specific user you could check also the temp direcotry of your user profile usually in c:\Users\AppData\Local\Temp