Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to command with spaces
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01465413
Message ID:
01465420
Vues:
52
W/o parenthesis 'mfilefrom' and 'mfilenameandloc' are treated by COPY FILE command as file names.
Enclosing 'mfilefrom' and 'mfilenameandloc' in parenthesis make them a Name expression.

>thanks sergey. i was initilly using the code
>
>COPY FILE mfilefrom TO mfilenameandloc
>
>but it wasn't working so i moved into the 2 lines i have below. I've re-tried the one line command with (&mfilefrom), (mfilefrom), &mfilefrom but to no avail.
>~M
>
>
>>Why use macro substitution when Name expression is appropriate?
>>
>>
>>COPY FILE (mfilefrom) TO (mfilenameandloc)
>>
>>
>>
>>>I am copying files from a clipboard to a location in a folder (thanks sergy). However when the source files have a space in them I cannot copy them. I take out all of the spaces for the destination file but I dno't know how to deal with the spaces on the source file. the pertinent code is below. mfilefrom will be something like "letter to customer about overdue accounts.doc" and the mfilenameandloc will have a full directory listing "K:\..." all with no spaces and then "lettertocustomeraboutoverdueaccounts.doc". If i use source files wihtout spaces it works so i think it's the space in the source that is the problem.
>>>
>>>mruncode = "COPY FILE " + mfilefrom  + " TO " + mfilenameandloc
>>>&mruncode
>>>
>>>~M
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform