Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
copy a file to another file with a variable name
I'm wanting to copy a complete text file (no data manipulation is needed and the file name is known) in it's entirety to another file that has a variable name. Both files will have the same extension on them (a CSV file as a matter of fact), but the pre-extension part of the file name to be copied to will be a variable (it will already have the .CVS extension as part of the variable value). I entend on using a string variable type for the destination file name. Any suggestions on how to do this? By the way, I need the code to generate the target file if it is not in the directory at the time that the copying is initiated, or if the file is present, then to everwrite it completely without any of the previous data being retained. The original file must be retained in its entirety.
Your assistance is greatly appreciated.
0 · ·