Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic capture file naming question 1

Status
Not open for further replies.

rking66

Technical User
Feb 26, 2003
18
US
I am trying to modify an existing script so that when the capture file is automatically created, the name of the Directory Entry will be included as part of the file name. I have placed a comment on line 14, as I think this is where I need the command. This script does continue on, (although I have only pasted a short section here) creating different capture files for other collected data, but it would still need to include the name of the Directory Entry for each one.

Any help would be greatly appreciated, thank you

proc main
integer iDay, iMonth, iYear, iHour, iMin, iSec
string ddate
string report1
string report2
string report3
string report4
string report5


ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
strfmt ddate "%d%02d%02d" iYear iMonth iDay

report1 = :**Here is the place that I believe Directory Entry name string would go

strcat report1 "_trks_"
strcat report1 ddate
strcat report1 ".cap"
set capture query off
set capture path "D:\Program Files\Symantec\Procomm Plus\Capture"
set capture file report1



transmit "LD 20^M"
waitfor "REQ: "
transmit "PRT^M"
waitfor "TYPE: "
transmit "TRK^M"
waitfor "TN "
transmit "^M"
waitfor "CDEN "
transmit "^M"
waitfor "CUST "
transmit "^M"
waitfor "DATE "
transmit "^M"
waitfor "PAGE "
pause 1

capture ON
pause 1

transmit "^M"
waitfor "NACT " FOREVER
pause 1

clear

capture OFF
 
If the script is running after the connection has been made, you can get the name of the Connection Directory entry from the $DIALCONNECT system variable.

 
Knob, thank you very much! The script works perfectly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top