I could easily obtain that info with the FBD "FolderBrowserDialog1.SelectedPath", but it does not allow the selection of .ZIP folders.. So now I am trying to do the same thing with the OFD but there isn't any code for obtaining the ".SelectedPath". Here's some code that shows what I am trying to do:
Private sourcePath As String
Private destPath As String
With OpenFileDialog1
.FileName = "DC_BACKUP"
.Title = "Locate DC_BACKUP.zip"
.InitialDirectory = Environment.SpecialFolder.Desktop
.Filter = ".ZIP (*.zip) |*.zip"
If .ShowDialog = Windows.Forms.DialogResult.OK Then
Try
destPath = .SelectedPath '*RIGHT HERE IS WHERE I NEED HELP FOR GETTING THE SELECTEDPATH*
sourcePath = destPath
Directory.CreateDirectory(Application.StartupPath + "\SavedFiles\DC_BACKUP")
CopyDir.CopyAll(New DirectoryInfo(sourcePath), New DirectoryInfo(Application.StartupPath + "\SavedFiles\DC_BACKUP\"))
UnZipFolder(Application.StartupPath + "\SavedFiles\DC_BACKUP\SavedFiles.zip", Application.StartupPath + "\SavedFiles\")
Catch ex As Exception
End Try
End If
End With
Any help would be greatly appreciated!

New Topic/Question
Reply



MultiQuote







|