0

I have no idea about command line scripts. I checked the few already existing threads on the similar topic however I could not find a thread which mentions the exact code to unzip the file. I have found the a code where Fk8pwu47g.zip is my file which I need to unzip for /R "C:\Users\sneshah\Desktop\2. ISM" %I in ("Fk8pwu47g.zip") do ("%ProgramFiles(x86)%\WinZip\winzip32.exe" Fk8pwu47g -y -o"%%~dpnI" "%%~fI")

but it throws errors as below:

Action: Add (and replace) files Include subfolders: no Save full path: no no files were found for -y that match your selection criteria. no files were found for -o"%C:\Users\sneshah\Desktop\2. that match your selection criteria. no files were found for Fk8pwu47g"" that match your selection criteria. Irrecoverable Error: Bad or incomplete option for the operation.

Yunus Temurlenk
  • 4,085
  • 4
  • 18
  • 39

1 Answers1

0

We achieved the requirement using a powershell script to unzip file. Here is the code


$src = "C:\Desktop\InputFile\"
$dest = "C:\Desktop\OutputFile\"

Add-Type -AssemblyName System.IO.Compression.FileSystem
$zps = Get-ChildItem $src -Filter *.zip

foreach ($zp IN $zps)
{
$foldernames = Get-ChildItem $dest
$newfolders = $dest + $zp

$all = $src + $zp
[System.IO.Compression.ZipFile]::ExtractToDirectory($all, $newfolders)
}