DOS for Windows, 32 bit
I have a program that saves data to a folder as an .rpt file. The file name is the input serial number of the part being checked with a preceding "C".
Subsequent runs of the same serial number over writes the original .rpt file.
I'd like to add a suffix to the serial number that's unique every time the program runs.
I was thinking I could use the time stamp. I'd like to convert the time stamp at the end of the run to a numeric value, set that value as a variable, and add it to the serial number with a preceding underscore.
Like this . . . (Note, we prefix ser nos with a "C")
(INPUT serial number) SN
Var1 = "_" + current time expressed as a numeric value
Var2 = "C" + SN + var1 + .rpt
So C12345.rpt would become C12345_102233.rpt (some numeric value)
Thanks for any help or ideas.
This is the old code . . .
PA,1,MOVE.PRG,NEW
OP,'^Z'
! OP,'PRI C',(SN),'.RPT >NUL'
OP,(T),'COPY C',(SN),'.RPT C:\PARSE >NUL',(T)
OP,(T),'COPY C',(SN),'.RPT Q:\CMM_DATA\',(F),'\PWAFILES\',(WAXDIE),' >NUL',(T)
OP,(T),'COPY C',(SN),'.RPT Q:\CMM_DATA\',(F),'\GPFILES >NUL',(T)
OP,'DEL C',(SN),'.RPT >NUL'
OP,'^Z'
OP,'ET,CL'
EP,1
TI,MOVE.PRG