I was hoping somebody can help mw with this, as I have been working on this for the past couple of days now.
I am trying to automate unzipping of files as follows:
Dim pinfo As New ProcessStartInfo
pinfo.FileName = "C:\Program Files\7-Zip\7z.exe"
Dim zipFile As String = "C:\File to Zip.7z"
Dim unZipfldr As String = "C:\UnZip Folder"
Dim pwd As String = "test"
pinfo.Arguments = "e " & zipFile & " -O" & unZipfldr & " -p" & pwd
Dim p As Process = Process.Start(pinfo)
This does not work with spaces in the file and folder names and I do not have control in naming them.
I tried enclosing the name in single-quote, double-quote and escape the names with \, but to no avail.
Any help and/or guidance will be greatly appreciated.
I am trying to automate unzipping of files as follows:
Dim pinfo As New ProcessStartInfo
pinfo.FileName = "C:\Program Files\7-Zip\7z.exe"
Dim zipFile As String = "C:\File to Zip.7z"
Dim unZipfldr As String = "C:\UnZip Folder"
Dim pwd As String = "test"
pinfo.Arguments = "e " & zipFile & " -O" & unZipfldr & " -p" & pwd
Dim p As Process = Process.Start(pinfo)
This does not work with spaces in the file and folder names and I do not have control in naming them.
I tried enclosing the name in single-quote, double-quote and escape the names with \, but to no avail.
Any help and/or guidance will be greatly appreciated.