Hey,
I'm making an application that copies files from one folder to another.
I want the copying progress shown in a label, just like in DOS when you copy files you'll see something like this:
folder\link.url
folder\Readme.txt
folder\setup.exe
folder\site.htm
4 file(s) copied.
I've come this far:
VB Code:
Option Explicit Dim a As Integer Dim b As Integer Dim Destination As String Private Sub Command1_Click() Destination = "C:\Temp-1" b = File1.ListCount - 1 For a = 0 To b Label1.Caption = Label1.Caption & vbCrLf & "Copying: " & File1.List(a) FileCopy File1.List(a), Destination & "\" & File1.List(a) Next End Sub
This works fine, yes, but now the text is shown in Label1 after all files have been copied. So my question is:
How can I make it show the current file that is being copied? Like this:
(When it's copying file1.txt):
Copying: file1.txt
(When file1.txt is copied and it's copying file2.txt):
Copying: file2.txt
If I didn't explain clear enough, just ask![]()




Reply With Quote