Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I rename a file with a space in it?
Message
De
30/10/2001 13:24:11
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
30/10/2001 12:15:49
Charles Richard
Nvo Management Systems
Boisbriand, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00574713
Message ID:
00575213
Vues:
31
>Fcreate create a file without the leading space.
>Fopen and Fwrite don't treat file names, just content.
>Erase &cFileName is like Erase (2 spaces) filename and is treated like 1 space
>FileToStr reads the file properly
>
>Still no way to delete or rename the file
cFile="  file with two spaces in front.txt"
CLEAR
=STRTOFILE("just testing", cFile)
?"created, exists?",FILE(cfile)
ERASE (cFile)
?"erased (cFile), still exists?",FILE(cfile)
=STRTOFILE("just testing", cFile)
?"created, exists?",FILE(cfile)
ERASE "&cFile"
?"erased '&cFile', still exists?",FILE(cfile)
Here it just does it right - I'm getting
created, exists? .T.
erased (cFile), still exists? .F.
created, exists? .T.
erased '  file with two spaces in front.txt', still exists? .F.
Tested in VFP7 on W2000 SP1 WS.
Are you sure those two leading characters are actually spaces and not some weird characters?

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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform