Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


barisumutlu
2017-04-22T12:22:27Z
Let's say I have several txt files with different names

and I wanna rename them to the following:

FI_200070300080000_{DATEFORMAT(ddMMyyHHmmss)}.txt

The problem is, they're all being renamed the same, if I check Overwrite, i get only one file and the others are gone, and if I uncheck overwrite in renaming, only one file gets renamed and my cmd batch crashes.

I wanna add some kind of index to the names, how? I
Sponsor
Forum information
thordw
2017-04-24T12:30:22Z
Hi

Difficult to solve since you want to add an index.

I think you're only option is to list all files and then loop thru them and rename them one by one,
using the {LOOP(Iterations)} variable, ex FI_200070300080000_{DATEFORMAT(ddMMyyHHmmss)}_{LOOP(Iterations)}.txt

Or if you don't want to use {LOOP(Iterations)}, create a job variable that you increment during each loop that you use instead.
Just remember to reset it before you're next run
barisumutlu
2017-04-25T06:44:13Z
I solved it differently by appending the original file's name, which is indexed and unique, to the new name FI_200070300080000_{DATEFORMAT(ddMMyyHHmmss)}.

but thank you your method will be useful for diff situations.
Gary_W
2017-04-28T14:35:24Z
Did you try adding fff to the date format to get milliseconds? I suspect the renaming happens so fast that seconds is not granular enough.

FI_200070300080000_{DATEFORMAT(ddMMyyHHmmssfff)}.txt
Scroll to Top