Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memo ftp, sorting and variable names
Message
De
18/09/2005 11:47:47
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
18/09/2005 11:38:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01050698
Message ID:
01050703
Vues:
18
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform