Results 1 to 3 of 3

Thread: Copy 500 folder from one folder to another creates problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    23

    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

  2. #2
    Frenzied Member
    Join Date
    Mar 2009
    Posts
    1,182

    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
    Option Explicit should not be an Option!

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width