Solved

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

Posted on 2004-04-28
2
1,082 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

617 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