Public Sub MoveFiles(ByVal sourcePath As String, ByVal DestinationPath As String)
If (Directory.Exists(sourcePath)) Then
For Each fName As String In Directory.GetFiles(sourcePath)
If File.Exists(fName) Then
Dim dFile As String = String.Empty
dFile = Path.GetFileName(fName)
Dim dFilePath As String = String.Empty
dFilePath = DestinationPath + dFile
File.Move(fName, dFilePath)
End If
Next
End If
End Sub
Public Sub DeleteFilesFromFolders(ByVal sourcePath As String)
If (Directory.Exists(DirPath)) Then
For Each fName As String In Directory.GetFiles(DirPath)
If File.Exists(fName) Then
File.Delete(fName)
End If
Next
End If
End Sub
Dim RPath As String = Application.StartupPath & "\File.exe" 'File.exe will be a temp name given to your exe, you can make it anything you want, or keep it as is.
' Will create the file with the given name
Using CreateFile As New FileStream(RPath, FileMode.Create)
CreateFile.Write(My.Resources.YourResource, 0, My.Resources.YourResource.Length)
End Using
