A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Coping and pasting files



 
 
Thread Tools Display Modes
  #1  
Old December 20th, 2006, 11:06 PM posted to microsoft.public.access,microsoft.public.access.forms
Ron
external usenet poster
 
Posts: 3
Default 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  
Old December 20th, 2006, 11:20 PM posted to microsoft.public.access.forms,microsoft.public.access
Daniel
external usenet poster
 
Posts: 1,017
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.