Link to home
Start Free TrialLog in
Avatar of sunhux
sunhux

asked on

Windows 2008 R2 unzip command

I noticed that when a zip file is read using Win 2008 Explorer,
the Explorer is able to extract out the files from the zip.

In 7-zip, I can issue  '7z -l zipfile' to view contents of a zip file
& as a way to verify the zip file's integrity is intact.

Without 7-zip, winzip or any 3rd party, what's the equivalent
Windows 2008 command to view the contents of a zip file
(without getting into Explorer).

Reason I need this is I'm writing a Windows batch script to
check integrity of a zip file that is ftp'ed (get) over from a
remote ftp server.

In 7-Zip, I'll issue "7z -l zipfile" & then test the errorlevel ie
7z -l zipfile
if %errorlevel% NEQ 0 echo zipfile is bad
if %errorlevel% EQ 0 echo zipfile is good
SOLUTION
Avatar of TunerML
TunerML
Flag of Jamaica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunhux
sunhux

ASKER

Just to add a bit:
my client disallows freeware/opensource tools (eg: 7zip)
to be installed on their Win2008 servers & they're not
prepared to pay for Commercial zipping tools so we
have to use Windows native zip/unzip.  The remote end's
management paid for Commercial zipping tool.

Can't use expand or compress commands as these commands
don't 'zip' up all files into one single zip file (as far as I understand)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunhux

ASKER

AlexPace, the customer disallows any 3rd party/Opensource ftp
client & ftp server;  only MS ftp server & MS ftp client is allowed:
does MS ftp'ies have these features?

To re-emphasize, no 7-zip, freezip or freeware zips allowed while
they're not going to pay for commercial zip tools even if it costs
only US$10 for a commercial tool (unbelievable demand but that's
what my customer's policy is).

Arnold, what you gave in that url looks like a Powershell script,
not a VB.  I can use PS but what's the syntax to use that script
& what's the equivalent of '7z.exe -l zipfile' ?  Pls give examples.

I'm Powershell illiterate
Avatar of sunhux

ASKER

> what's the syntax to use that script & what's the equivalent of
> '7z.exe -l zipfile' ?  Pls give examples

Also, after executing that PS script, can I check its status by
' if %errorlevel% NEQ 0 ...... " ?

Also, give me a sample command of that PS script to unzip
a zipfile
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunhux

ASKER

Just one last question:

my customer asks:  since it's possible to unzip
from Windows Explorer (in Win 2008 R2), isn't
there any equivalent command (at command
line) to do zip & unzip in Win 2008 ?  If there
is, what's those commands?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial