Alright, so in yesterday's thread, I asked for the codes to copy the contents of a directory to a separate directory. The code:
My.Computer.FileSystem.CopyDirectory( , , )
worked fine.
However, I have decided that I wish to add a progress bar into the mix so that the user can see the progress of the transfer \ copy. So far:
btn_Quit.Enabled = False
Dim path As String = Application.StartupPath
Dim prgpath As String = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)
Dim datfldr As String = (path + "\a")
Dim prgfldr As String = (prgpath + "\1")
IO.Directory.CreateDirectory(prgfldr)
Dim prgfldr2 As String = (prgfldr + "\2")
'' ------------------------------------------
ProgressBar1.Maximum = IO.Directory.GetFiles(datfldr, "*", IO.SearchOption.AllDirectories).Length
For Each file In IO.Directory.GetFiles(datfldr, "*", IO.SearchOption.AllDirectories)
Dim dest As String = prgfldr2
My.Computer.FileSystem.CopyFile(file, dest)
ProgressBar1.Value += 1
Next
'' ------------------------------------------
''My.Computer.FileSystem.CopyDirectory(datfldr, prgfldr2, True)
btn_Quit.Enabled = True
is my installation button, but it only returns the folder "2" as an empty file with no extension. I have tried using IO.File.Copy aswell, but the instructions on MSDN arent working at all.
Any ideas on this, my newest problem would be appreciated.