Computing.Net > Forums > Programming > copies a file 2 a folder andsubdir

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

copies a file 2 a folder andsubdir

Reply to Message Icon

Name: Kamran
Date: March 6, 2005 at 13:10:01 Pacific
OS: Winxp-SP2
CPU/Ram: Celeron Tualatin 1.4/ 512
Comment:

How can i make a VB6 program that it copies a file to a folder and all of its subdirectories?



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: March 9, 2005 at 10:05:51 Pacific
Reply:

use the Win32 API FindFirstFile, FindNextFile, and FindClose to iterate through the source directory (i would suggest creating a recursive function to get all subdirs and files) then use FSO (FileSystemObject) to create the target paths and copy the files as you find em.

I have made one of these before...I'll look to see if I can find it (it might be a few days as it would be on a project backup CD...geeze there are a lot of these lying around this office...)

Hope this helps,
Chi

They mostly come at night...mostly


0
Reply to Message Icon

Related Posts

See More


Path problem how to make an image file...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: copies a file 2 a folder andsubdir

creating a file using a .bat file www.computing.net/answers/programming/creating-a-file-using-a-bat-file/11035.html

Creating a file with a program(vb6) www.computing.net/answers/programming/creating-a-file-with-a-programvb6/3208.html

start a file using a program www.computing.net/answers/programming/start-a-file-using-a-program/19869.html