Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy file command from one directory to another
Message
De
16/11/2004 13:46:01
 
 
À
16/11/2004 10:09:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00961585
Message ID:
00961841
Vues:
4
Thank you. I knew that COPY FILE should have worked with a Name Expression but I could not get it to do so. That is why I was assuming that the command did not support it. But.... when you submitted your solution (addbs) I took a closer look at what I was doing. I was specifing the drive letter incorrectly. I was using d: instead of D:\. I really needed to go back to the root of D: in my specification and that was the problem. Thank you for opening my eyes.

Thanx to Selim, Jon and Serg.


>
COPY FILE (addbs(lcFromDrive)+addbs(lcFromDirectory)+lcFromFile) TO (addbs(lcToDrive)+addbs(lcToDirectory)+lcToFile)
>
>>How would you handle this?
>>
>>lcFromDrive = "C:"
>>lcFromDirectory = "MyDirectory"
>>lcFromFile = "MyFile.txt"
>>
>>lcToDrive = "D:"
>>lcToDirectory = "MyOtherDirecotry"
>>lcToFile = "FilesNewName"
>>
>>
>>>>Hi,
>>>>
>>>>I need to copy files from one directory to another while in vfp. The COPY FILE command works great as long as the file I am copying is in the directory that I am operating vfp from. Basically I am looking for a command or work around that permits me to operate vfp from a different directory that the file I am copying and then specify the directory to which I want to copy into.
>>>>
>>>>Pseudo Code:
>>>>Copy C:\MyDirectory\MyFile.txt to d:\MyOtherDirectory\FilesNewName.txt
>>>>
>>>>Any thoughts?
>>>>Neil
>>>
>>>
>>>I don't see any reason why you can't use your code to do so
>>>
>>>
>>>Copy file C:\MyDirectory\MyFile.txt to d:\MyOtherDirectory\FilesNewName.txt
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform