Discussion (8)1
Log in or sign up to continue

I'm trying to unzip a CSV file and save it to a different folder. I utilised above example but unfortunately below command is returning the status code 1. 

set path = "U:\xxx\xxxxx.zip"
set pathtoExt = "U:\uncompress\"
set cmd = """C:\Program Files\7-Zip\7zG.exe"""
set args = 3
set args(1) = "x"
set args(2) = path_ "*.csv"
set args(3) = pathtoExt
set status = $ZF(-100,"/SHELL",cmd,.args)
write status

The following example returns status code 0 to me:

set path = "U:\TEST.rar"
set pathtoExt = "U:\uncompress\"
set cmd = """C:\Program Files\7-Zip\7z.exe"""
set args = 4
set args(1) = "x"
set args(2) = path
set args(3) = "-o"_pathtoExt
set args(4) = "-aoa"  ; set Overwrite mode = always
set status = $ZF(-100,"/SHELL",cmd,.args)
write status