Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-04-28
2
Medium Priority
?
1,084 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 375 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 375 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 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…
Suggested Courses

670 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