Thanks, Knob. I can't seem to get it to work. It gets it's name from the Filenm = $date. line. If I change that to $dilconnect, it puts in the sit name from the Connection Directory. I'd like to have both, if possible. Below is the beginning of the script:
integer Position = 1
string szPath = "C:\Opt11cbackup" ; Path to file.
string filenm = $NULLSTR
filenm = $date ;sets the name from Control Panel
while (Position != 0)
strfind filenm "/" Position ;searches for / (illegal character)
if failure ;tests for a failure
Position = 0 ;sets condition to False
else ;successful search
strdelete filenm Position 1 ;removes illegal character
endif
endwhile
while (Position != 0)
strfind filenm "-" Position ;searches for -(illegal character)
if failure ;tests for a failure
Position = 0 ;sets condition to False
else
strdelete filenm Position 1 ;removes illegal character
endif
endwhile
addfilename szPath filenm ; Adds the file name to path.