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 12:03:56
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/10/2001 23:42:47
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:
00575155
Vues:
43
>Originally, I set the current directory to the location of the file. I just tried from a parent directory and funny thing ...:
>
>I put the path in a variable then tried the other functions:
>
>ADIR still works, RENAME and ERASE still fail but FOPEN works.
>
>Go figure ...
>
>But this is an exotic curcumstance ... there should not be a space as the first character of a file ... Maybe that was the case in the one you remember ...

Adir() and fopen() read it, but those which have something to do to the file probably don't. Does FileToStr() work? If it does, you can still copy the file, and then open it with fopen() and than truncate it somehow? Would fCreate() work? You may end with a bunch of zero-length files, though, but erasing them manually once a month wouldn't be too hard.

The other exotic situation was about some strange device name, don't remember exactly what, but it should have behaved like a disk, but didn't. I remember that macro substitution, with macro within quotes, did work in that case. You may try that as well, i.e. erase "&cFileName".

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