Copy 500 folder from one folder to another creates problem
Hi,
I am trying to copy the subfolders from one folder to another.
This is working fine when my subfolders are less in number.
When i am trying to copy a huge number(say 500 subfolders), the next line of the program after completion of copying is not executed, instead my program has completely exited.
<code>FSO.CopyFolder Source:=FromPath, Destination:=ToPath</code>
This is the code which i am using for copying the sub folders from one location to another,
Please some one help me, its urgent..
What should be taken care while copying huge number of subfolders from one location to another.
Thanks in Advance,
Gayathri.k
Re: Copy 500 folder from one folder to another creates problem
First, enumerate through source to calculate size. Then check to see if destination has enough room. Third, if over a network, then use instrinsic filecopy function to copy files one at a time so you can also use a progress bar to notify users of progress and to allow you to catch copy errors... Copy errors can be caused by network errors so when you catch error you will be able to retry or notify user or notify user and prompt for retry...
ps. FSO is the slowest way to go
Good Luck
Re: Copy 500 folder from one folder to another creates problem
Check this code bank submission of Ellis Dee: http://www.vbforums.com/showthread.php?t=466340.... :wave: