Solved

FSO CopyFolder  in VB 6 -- how to know when it's finished?

Posted on 2004-04-28
2
1,079 Views
Last Modified: 2012-05-04
Please could an expert suggest the best way to detect in VB6 when FSO CopyFolder has finished copying.

When the folder has much content the process can take enough time to permit an unintended user intervention.

Will be appreciated

Gordon
0
Comment
Question by:Gordon_Atherley
2 Comments
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 125 total points
ID: 10945117
In my experience FSO.CopyFolder is finished when it moves on to the next command.  Consider this code sample:

    Dim fso As New FileSystemObject
    Label1.Caption = "Running"
    DoEvents
    fso.CopyFolder "C:\Source", "C:\Destination\", True
    DoEvents
    Label1.Caption = "Finished"

When I run this the label stays at running until the CopyFolder process is actually finished and moves on to change the label to "Finished".  
0
 
LVL 3

Accepted Solution

by:
Level10Access earned 125 total points
ID: 10945407
Using FSO, the script will only move to the next line after the copyfolder process is either completed or errored out.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 67
Hide vba in gp 7 105
Recommendation vb6 to vb.net or others 14 177
Automatic Email Reminder 4 58
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question