Here is my current code, and it works fine to choose one image and copy it, however, I cannot figure out how to allow multiple file selections then copy them to a new folder.
Please help!
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strFileName As String
Dim Export As String 'filename only
Dim I As Integer 'variable used for counting
Dim DidWork As Integer = OpenFD.ShowDialog() 'for use below in calculating
OpenFD.InitialDirectory = "c:\imagetest\" 'sets initial directory for user to choose files
strFileName = OpenFD.FileName 'sets file name to the variable strFileName
'If user pushes cancel before selecting file this error displays
If DidWork = DialogResult.Cancel Then
MsgBox("Aw snap! You clicked cancel!")
Me.Close()
Else
MsgBox(strFileName) 'show a messagebox with the file selected
End If
OpenFD.Reset()
Export = Path.GetFileName(strFileName) 'sends only the filename and extension to the variable export
If strFileName = "" Then
Me.Close()
ElseIf Export = "" Then
Me.Close()
Else
FileCopy(strFileName, "c:\flexihotfolder\" & Export) 'copies file to specified folder
End If
End Sub
End Class