Hi All,
I would like to add a date to the file name and I'm using the simple script:
Day>Day
Month>Month
Year>Year
Let>todayDate=%Year%%Month%%Day%
.
.
.
.
MoveFile>T:\temp\file.txt,T:\temp\file_%todayDate%.txt
I've never had an issue when the script was "launched" as an .exe from a program. In this case the script is always on and watching a folder for a specific file to load before working. The file WILL add the correct date the first time, then use the same date the following day.
Example Result:
Day 1 (May 12, 2015)
file_20150512.txt
Day 2 (May 13, 2015)
file_20150512.txt
Is there a command that needs to "reset" the script so it knows a new day has occured? If I stop the script and re-start, I will once again get the corect date.
**Note: I have not run the script past two days to see the next days result
Thanks,
Dom
Date not updating?
Moderators: Dorian (MJT support), JRL
Re: Date not updating?
hey Dom,
seems to me that
Day>Day
Month>Month
Year>Year
Let>todayDate=%Year%%Month%%Day%
must be on a position in the script AFTER you notice that there s a new file in the folder.
The only reason that the date isnt refreshed, is because the date is init once, at the beginning of the script.
Perhaps you can put the whole script here, so we can see the loops and labels.
kind regards
Djek
seems to me that
Day>Day
Month>Month
Year>Year
Let>todayDate=%Year%%Month%%Day%
must be on a position in the script AFTER you notice that there s a new file in the folder.
The only reason that the date isnt refreshed, is because the date is init once, at the beginning of the script.
Perhaps you can put the whole script here, so we can see the loops and labels.
kind regards
Djek
Re: Date not updating?
Ok - I didnt have the date calculation inside my checking loop, so it was never able to get the new information.
Thanks!
Dom
Thanks!
Dom