My console application program is creating some runtime files while it is working so what I want to do is delete all of these files on the application startup. I have tried
Using Windows API MoveFileEx might be a potential solution with a parameter MOVEFILE_DELAY_UNTIL_REBOOT to remove the file only after reboot.
Please check http://msdn.microsoft.com/en-us/library/aa365240%28v=vs.85%29.aspx.