In my windows service I am creating a text file (filename is the current date) and dumping it into a specific folder. From there I want to duplicate that first file keep the original and create a new one with a specific name (lets call it copyoffile).
>>>>From there I want to copy that file from one folder to another (but thats not the question here).<<<<
So how do I duplicate the text file, assign it to a name of copyoffile.txt while maintaining the first copy of the file as well. Then the next time the service runs this (again the first file is created with the current date and time as the filename, but again the file is to be duplicated, called copyoffile.txt, but this file will and should overwrite the file from the previous time the service was run.