I wrote a script to give an automatic filename to a capture file.
The name I wish (because I must have) contains 11 characters (like: CODyyyymmdd) but system seems to allow only 8 characters lenghtwise filename.
yes you can bypass the 8 Character rule.
I don't know how many caharcters you can have but I use mine with more than 8, but you can't have spaces. Procomm sees that as a directory change and will error out.
CapPref = "FR1" ;Add an argument (simplified here).
TempVar1 = $date ;Get current date.
strextract CapDate TempVar1 "/" 0 ;Get year(yyyy) from date.
strextract TempVar2 TempVar1 "/" 1 ;Get month(mm)from date.
strcat CapDate TempVar2 ;Add month to year.
strextract TempVar3 TempVar1 "/" 2 ;Get day(dd) from date.
strcat CapDate TempVar3 ;Add day to year&month.
CapFileName = CapPref ;Set file name to CapPref.
strcat CapFileName CapDate ;Add date to filename.
strcat CapFileName ".dat" ;Add '.dat' ext to filname.
endproc
It doesn't work because I have more than 8 characters!!!
Your script gave the expected result (FR11101703.dat) when I ran it on my machine, so it looks like that procedure is working succesfully. I assume you are using set capture filename in another portion of your script to set the capture file name? Be aware that you cannot include any path information in the set capture file command - it must be a filename only. To set the path, you would use the set capture path command.
Yes I do. My path is defined in another part of my script.
I use Procomm / Aspect 2.11. Is it possible that the script works with newer versions and not with this one?
That's very possibly the reason. I don't believe Procomm supported long filenames until it moved into the 32-bit world with version 4.0. I don't think I have version 2.11 installed at home, but I have 3.0 installed on my old NT machine and will try to run your script there tonight if possible.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.