Adding Extension to Written File
Adding Extension to Written File
(OP)
I have a program that reads the name of a file and from the name creates a new file. It's done by setting the name of the original file as a character variable, x, and then substituting that variable into "FILE=x"
Is there a way to add .txt or .xls or something similar after the x?
Is there a way to add .txt or .xls or something similar after the x?
RE: Adding Extension to Written File
Just add //'.txt' after the string variable which will concatenate the text string '.txt' on to your string variable
FILE=x//'txt'
RE: Adding Extension to Written File
File= TRIM(x)//'.txt'
The above will get rid of the excess spaces at the end of 'x'. Also... you must make sure you declare x and File to be Character variables of sufficient length.
Dan
www.dtware.com