I would like to create a batch that explores every day a formula and saves it as a CSV File. Is there any possibility to change automatically the name of the file? For example, Exploration_System1_20020118
I only see the option where it overwrites the CSV file everytime.
You can just create a Windows BATCH (.bat) file that will issue RENAME command from the "constant" file name to the name of your choice (you could use commands inside .bat file to create date string).
Really, for all your programming questions USE GOOGLE. Google has pretty much all answers to such typical questions.
If you searched for "windows batch rename with date":
Actually as your file is a csv file (text type) you can also copy it line after line and delete the original using afl functions (this avoids the warning)
src = fopen(path+filename, "r");
dest = fopen(path+filename+ "_20" + (Now(3)-1000000), "w");
if (src && dest) {
while(!feof(src)) {
fputs(fgets(src), dest);
}
fclose(dest);
fclose(src);
fdelete(path+filename);
} else {
if (src) fclose(src);
if (dest) fclose(dest);
}
ShellExecute() based solutions were already listed in the thread I linked to, so I didn't mention them. By the way as noted there it can cause problems depending on usage (read the 1st post). In that case the 2 solutions I wrote here should work. Thanks for repeating them there anyway.