Copying multiple files ( help )
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Thanks man!!!
loove;
i will ask this simple question here because i dont want to start new topic = waste of space of site so this the question
Can I put a label ( Files Remaining: and the number of files needs to be copied ?
maybe this will work or no idk just asking if its then what the code?
Thanks
Best programmer for ever is Begoh7!!
loove;
i will ask this simple question here because i dont want to start new topic = waste of space of site so this the question
Can I put a label ( Files Remaining: and the number of files needs to be copied ?
maybe this will work or no idk just asking if its then what the code?
Thanks
Best programmer for ever is Begoh7!!
You could use this (I already inserted it in Bogoh's code, so you can just use as is ;) )
Code: Select all
ProgressBar1.Maximum = ListBox1.Items.Count
Dim itemCount As Integer = ListBox1.Items.Count
Dim itemMax As Integer = ListBox1.Items.Count
Label1.Text = Convert.ToString(itemCount) & " items remaining on " & Convert.ToString(itemMax) & " items."
For i As Integer = 0 To ListBox1.Items.Count - 1
Dim thestrings() As String = ListBox1.Items(i).ToString.Split("\")
Dim filename As String = thestrings(thestrings.Length - 1)
FileCopy(ListBox1.Items(i), "C:\Test\" & filename)
ProgressBar1.Value = i + 1
itemCount -=1
Label1.Text = Convert.ToString(itemCount) & " items remaining on " & Convert.ToString(itemMax) & " items."
Next
MsgBox("File Completed Copying", MsgBoxStyle.Information, "Done!")
thanks for ur help comathi
EDIT: it stays 0 out of 20 or anything
it stays "0" not changing :o

EDIT: it stays 0 out of 20 or anything
it stays "0" not changing :o
Last edited by CodenBoy on Sun Jul 15, 2012 6:48 pm, edited 1 time in total.
Would you by any chance have TeamViewer? It might be easier for me, or anyone else for that matter, to help you if they can actually see how you placed the code.
Sure, i sent you my teamviewer id and password by PM
Thanks loove;
Thanks loove;
#comathi shouldnt it be Label1.Text = i & " items remaining on " & Convert.ToString(itemMax) & " items."
Copyright Information
Copyright © Codenstuff.com 2020 - 2023