Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test extension
Message
From
26/05/2011 07:48:58
 
 
To
25/05/2011 23:49:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01511789
Message ID:
01511808
Views:
67
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform