Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy file command from one directory to another
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00961585
Message ID:
00961588
Views:
8
>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
>

You can use Name Expression.
lcFromFile = "C:\MyDirectory\MyFile.txt"
lcToFile = "d:\MyOtherDirectory\FilesNewName.txt"
COPY FILE (lcFromFile) TO (lcToFile)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform