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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying Multiple folders from source to destination

Status
Not open for further replies.

vmaruv

Programmer
Apr 8, 2002
102
US
Hi,

How can I copy multiple directories from source to destination. My requirement is as follows :

When I browse the source, the contents of the source folder should be displayed and I should be able to select multiple folders. Later, i will browse for the destination folder and then click on the copy button. All the folders selected should be copied to the destination.

I am able to browse and select only one folder at a time. Is it possible to select multiple folders ?

Please help.
 
I guess you haven't had time yet to read the faq that I referred you to in thread222-1051283, which shows how to get the best from the forum. It would help you if you did so.

For this question use FSO or DIR to manually populate a listbox with multiselect set to True, then loop through the Selected Items

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Hi john,

I did read the faq. Not able to figure out why my question is not relevant. I did a lot of search for this question of mine on the net and vb resources before I posted it here with a hope that i would get an answer. I am not looking for the entire code. I would just want to know if there is any specific property of function that I can lookup on the net for more info.

It would great help to me if you can tell me why my question does not follow the fourm norms. I will surely try to implement next time when I post any queries. As said earlier, I feel this form is like having a best friend who is a VB expert !!

Thanks again for you help.
 
Did you try the method I suggested?

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
I'm not really sure how to do it. Totally confused [sad]. Did not work with list boxes earlier...
 
Thanks a lot John. I am able to do it now using list boxes. I learnt the usage of listboxes and did it [smile]. The little clue you gave really worked for me.

I have another question regarding the directory copy. I have used FileSystemObject to perform the copy operation as :

fso.CopyFolder source, destination, True

The thing here is that the source directory structure is not preserverd in the destination.
For example I wish to copy a file from c:\source\test to c:\destination I want the destination to create a folder "source" and then a subfolder "test" and then at last copy the contents. This is not happening. my destination has just the contents but the structure is lost. Is there a way to do this ? Again, I did a lot of search on this but could not get simple way to do it.

Pleas suggest. Your clues / suggestions are really helpful in completing my project.

Thanks in Advance.


 

MkDir statement - creates a new directory

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top