Hi Karen,
as Naomi already wrote, FORCEEXT() is the function you should use.
lcSrcFName = [MyOriginalFile.txt]
lcNewFName = INPUTBOX( [Filename] , [Define the name of the file] , [MyNewFile] , 0 , [] , [MyNewFile] )
lcNewFName = FORCEEXT( lcNewFName , JUSTEXT( lcSrcFName ) )
COPY FILE ( lcSrcFName ) TO ( lcNewFName )
>
>@ 0,1 say "Re-Name File: " get fln
>READ
>fln = rtrim(fln)
>COPY FILE m.txt to c:\vaniermu\&fln
>
>Is there a way to test the extension of data entered.
>Here i ask if the operator wants to name the file but if the extension txt is not typed
>i would like the program to add it automatically. Any siggestons would be appreciated
>thanks K
>
>
>@ 0,1 say "Re-Name File: " get fln
>READ
>fln = rtrim(fln)
>COPY FILE m.txt to c:\vaniermu\&fln
>
Best Regards
-Tom
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011