Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo ftp, sorting and variable names
Message
From
18/09/2005 11:47:47
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
18/09/2005 11:38:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050698
Message ID:
01050703
Views:
11
>It's a bit of a tight situation on indexing, Mike. How about this
>
>LengthReturned = LEN(filename)
>ShortName = Substr(filename,1,(LengthReturned-4))
>MemoFileName = ShortName+".FTP"
>
>Then I can use Copy File. It seems to do the job. I'll give it a try this way.

In case you ever use a non-standard extension (length different from 3), you may consider using the filename functions instead:
MemoFileName=forceext(filename, "FPT")
Also, for other filename manipulation, check DefaultExt(), JustFName(), JustStem(), JustExt(), ForcePath() functions. They look much neater than using at(), Substr() etc, and you don't need to worry whether the path name contains the final backslash or not.

BTW, FTP is File Transfer Protocol. FPT is the memo file extension. Take care.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform