If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Coping and pasting files
Hi,
I'd like via a cmd retrive a file from a server (\\server\folder\filename) and save it on my desktop. Can it be done and if so, how? TIA Ron -------------------------------------------------------------------------------- Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados. Ha eliminado 1231 correos spam hasta la fecha. Los abonados no tienen este mensaje en sus correos. ¡Pruebe SPAMfighter gratis ya! |
#2
|
|||
|
|||
Coping and pasting files
Here are some suggestions: 1. You can use VBA's FileCopy statement to copy the file and then (if you want) use VBA's Kill statement to delete the original. The syntax is: FileCopy source, destination and Kill pathname Kill supports the use of multiple-character (*) and single-character (?) wildcards to specify multiple files. 2. Add a reference to the Microsoft Scripting Runtime (by selecting it in the References dialog that appears when you select References from the Tools menu in module view), and then use the MoveFile method of a FileSystemObject object to move the file, as in: Dim objFileSystem As Scripting.FileSystemObject Set objFileSystem = New Scripting.FileSystemObject objFileSystem.MoveFile "C:\Temp\Old File.txt", "D:\Temp\New File.txt" Daniel "Ron" wrote: Hi, I'd like via a cmd retrive a file from a server (\\server\folder\filename) and save it on my desktop. Can it be done and if so, how? TIA Ron -------------------------------------------------------------------------------- Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados. Ha eliminado 1231 correos spam hasta la fecha. Los abonados no tienen este mensaje en sus correos. ¡Pruebe SPAMfighter gratis ya! |
Thread Tools | |
Display Modes | |
|
|