Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I rename a file with a space in it?
Message
From
29/10/2001 23:15:38
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
29/10/2001 17:10:25
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00574713
Message ID:
00574865
Views:
26
>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.
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform