Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to copy whole directory to antother place? 1

Status
Not open for further replies.

rgao

Technical User
Feb 1, 2002
38
CA
Hi,there
I'm trying to writing code to copy a specified directory (include all files) to another place.Could some give me some suggestions? Thanks for any hint.
 
You should be able to use the File Scripting Object in order to copy an entire folder to another location.
 
' Add reference to MS Scripting Runtime
Dim objFSO As FileSystemObject
Set objFSO = New FileSystemObject
objFso.CopyFolder source, destination, True ' Overwrite=True
' Move to destination and erase from source
'objFso.MoveFolder source, destination, True ' Overwrite=True Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
hi,Johnyingling ,jsnull
Thank you for your help,I got it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top