Hi all,
I'm really struggling to workout this shell command on paths with spaces in them.
The code below works with no issue, but as soon as I uncomment the long path with the same set of 20 zip files, I get an error (Error: cannot find archive).
I feel like I've tried an infinite number of versions using multiple quotes and chr(34)'s, but I can seem to get anything to work.
I'm really struggling to workout this shell command on paths with spaces in them.
The code below works with no issue, but as soon as I uncomment the long path with the same set of 20 zip files, I get an error (Error: cannot find archive).
I feel like I've tried an infinite number of versions using multiple quotes and chr(34)'s, but I can seem to get anything to work.
Code:
Sub UnZipFiles()
Dim command As String
zip = "C:\Program Files\7-Zip\7z.exe"
Source = "C:\test"
Destin = "C:\dump"
' Source = "C:\Users\xxxxx\Documents\More Sad Attempts at VB\LEC stuff\test"
' Destin = "C:\Users\xxxxx\Documents\More Sad Attempts at VB\LEC stuff\dump"
command = """" & zip & """" & " e " & Source & " -o" & Destin
Shell "cmd /k " & (command), vbNormalFocus
End Sub