Hello,
I am realitvely new to Diadem (using v10) and vbscript and I am having a problem. I have many .tdm files which need to be loaded, then data from the datasetcomments is to be read then saved in the new filename.
The problem I am having is that I am using FileDlgName in the process of opening a dialog box to ask for a file. If I then want to resave this file using that original FileDlgName, but without the last 4 letters (ie, without the .tdm extension) and then add a bit of info. ie. original is text.tdm and the new saved file is currently the output gives text.tdm_a_bit_more.tdm, and I would like it to say text_a_bit_more.tdm...I'm not really sure what to do!
I have tried using:
'Dialog box for entering filename
Call FileNameGet("Navigator","FileRead", "*.TDM")
Call DATAFILELOAD(FileDlgName) 'loads whatever data file is selected
'then to remove the .tdm part
dim filename = [(FileDlgName)] 'declares an array
dim nameOnly = Left(filename,Len(filename)-4)
but this doesnt seem to work! any ideas please?
I am also wondering if anyone knows how I can changed data from a dataset comment, eg. if datasetcomment(1) was 1-2-3, how would I replace the - with a _, ie so datasetcomment(1) read 1_2_3 , so I can then use this value in the filename.
I currently don't have any problems inputting the standard datasetcomment(1) into the filename.
Many thanks in advance for any help