I have a file that is generated daily. It is generated with the filename
The file needs to be copied into a destination folder and numerated with a single digit that is one higher than the file already in the destination folder so that all files coexist and have no gap in numeration.
In other words, I need each day's copy to add +1 to whatever is already in the destination folder. If 0,1 & 2 exist in the destination folder, then the new copy placed in the destination should be named 3 and so on. If no files exist, it gets named 0.
copy c:\source\dailyfile.dat -> c:\destination\dailyfile1.dat