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
29/10/2001 23:15:38
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
29/10/2001 17:10:25
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:
00574865
Vues:
27
>Nope. ADIR puts the file name into an array but RENAME, ERASE, FILE and FOPEN fail even using the parenthesised variable method.
>
>>
  • VFP has three ways to delimit texts: double quotation marks, single quotation marks, and []. Thus, if a text contains single quotation marks, you can use double quotation marks on the outside, or vice-versa.
    >>
  • I think if you use a variable for both the source name and the destination name, the following should work even if the filename contained spaces or quotation marks:
    >>
    >>
    >>rename (source) to (target)
    >>
    But then aDir() doesn't include the path - but I presume you added it, i.e. that source and target variables contain regular paths. This is the first time I've heard of a named expression not being able to find the file. There actually was one before, but it happened in some exotic circumstances to someone here, and I can't remember what it was.

    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