I need to update a file on a server every fifteen or so minutes. This involves a file copy from an authoring site on to the server.
Occasionally (And with a lot of bad luck) the .Net application that serves the file reads it at a period in time when the file is being overwritten and therefore reads in an empty file. The problem is compounded because for performance reasons the file is cached for up to 15 minutes.
Is there anyway in Windows to minimise the possibility of the file being blank? i.e. is there a way to copy the contents into the file but not "commit" them to the file system until its fully written?
The file is copied using SSH/FTP as its on a non-domain box within the DMZ and hosted on Windows 2008 R1 machines.