irishhooligan
IS-IT--Management
I have a script to print the history file and save the file into a .txt file. However, I want to add the date to the filename. I've been looking at the Date variables in Procomm and could use some help. Heres my script:
;Recorded script. Editing may be required.
proc main
string fname
string pname
fname = "historyfile.txt" ;name of file where I want to add the date
pname ="C:\" ;path for file
set capture file fname
set capture path pname
capture on
transmit "LOGIN ^M"
waitfor "PASS?"
transmit "......^M"
waitfor ">"
transmit "LD 22^M"
waitfor "REQ "
transmit "PRT^M"
waitfor "TYPE "
transmit "AHST^M"
waitquiet 2 FOREVER
waitfor "REQ "
transmit "END^M"
waitfor ">"
transmit "LOGO^M"
transmit ">"
capture off
endproc
;Recorded script. Editing may be required.
proc main
string fname
string pname
fname = "historyfile.txt" ;name of file where I want to add the date
pname ="C:\" ;path for file
set capture file fname
set capture path pname
capture on
transmit "LOGIN ^M"
waitfor "PASS?"
transmit "......^M"
waitfor ">"
transmit "LD 22^M"
waitfor "REQ "
transmit "PRT^M"
waitfor "TYPE "
transmit "AHST^M"
waitquiet 2 FOREVER
waitfor "REQ "
transmit "END^M"
waitfor ">"
transmit "LOGO^M"
transmit ">"
capture off
endproc