Simple Copy command

how can I simply copy *.* files through VB
best would be to UNC targed
LVL 1
MKraussAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
AzraSoundConnect With a Mentor Commented:
you can use the filesystemobject..for example:

Dim filesys As Object

Set filesys = CreateObject("Scripting.FileSystemObject")

filesys.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"


0
 
scibbermeCommented:
You could use vb to make a batch file. Then use "shell" to run it. This would let you use any DOS commands.
0
 
paulstampCommented:
Use the FileSystemObject (add a reference to Microsoft Scripting Runtime) and use

Dim X as new FileSystemObject

X.CopyFile "c:\*.*", "\\target\folder\"
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
paulstampCommented:
Sorry Azrasound - your comment came up as I was posting !
0
 
MKraussAuthor Commented:
Works fine => Thanks
0
 
AzraSoundCommented:
not a problem paul...thanks for the B mk
0
All Courses

From novice to tech pro — start learning today.