MSFN Forum: VB Help Plz - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

VB Help Plz Rate Topic: -----

#1 User is offline   Dessip 

  • Newbie
  • Group: Members
  • Posts: 42
  • Joined: 17-September 04

Posted 24 September 2004 - 07:17 PM

Hey i am trying to get a command in VB that allows me to copy a actual folder from one place to another, but VB 6 only supports FileCopy which copys a file from one location toanother, i have thought about it useing Shell XCOPY, but the problem is if i do that then i am gonig to need it to report back that it has done so the code can continue to run, Also i dont want to use and Refrences, i would rather use API but i dont know a API call for that only for CopyFile, but i have even tryed FileCopy C:\blah\*.* C:\blah2\*.* but it only copied the files that was in the root of blah folder.

Thanks In Advance
Dessip


#2 User is offline   Redman 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 22-August 04

Posted 04 October 2004 - 11:30 PM

Look here a lot of source code examples.


Planet Source Code

Redman

#3 User is offline   TheRookie 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 03-March 04

Posted 07 October 2004 - 02:52 AM

Try this,

Dim fs As Object

Set fs = CreateObject("Scripting.FileSystemObject")

fs.CopyFolder "C:\Temp", "D:\Temp"

Set fs = Nothing

This copies all subfolders and files from the first path to the second path, note that both folders must exist.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy