Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to handle password protected zipfiles

by Anonymous Monk
on Dec 01, 2004 at 13:45 UTC ( [id://411452]=note: print w/replies, xml ) Need Help??


in reply to How to handle password protected zipfiles

Thanks for the info... Little confused with intentional input; This is what I understand --> I catfile my zip to a forwarding directory and the next line qx the intended zip file? My results are showing "The system cannot find the path specified". Not sure where the logic is failing me or if pkzip has problems with unc paths. $pkzip=File::Spec->catfile'$data_file','to','$data_control_dir'); qx!$pkzip -extract -pass XM#ip82# $data_file!;
  • Comment on Re: How to handle password protected zipfiles

Replies are listed 'Best First'.
Re^2: How to handle password protected zipfiles
by nimdokk (Vicar) on Dec 01, 2004 at 14:24 UTC
    I would suggest reading what File::Spec does. That line is simply building the path to wherever pkzipc.exe is located (assuming that is the name of the binary you are using) and assigning that to $pkzip. Its just a convenient shortcut. Of course, this assumes that you have pkzip (or some other commandline based zip utility) installed (Winzip does not work because it is a GUI, there is a commandline plug-in for it, but it costs). You will also need to read up on qx!! (or other methods for making system type calls with Perl - see the Camel Book or other online documentation for Perl).
      I don't see the point in using File::Spec to construct the path for an executable on Windows only.

      If you were to actually go search for the program in PATH — or should I say, File::Spec->path — then I could understand. Now you're just acting silly.

        PKzip isn't Windows only. Writing portable code is JustPlainRight(tm).


        The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. -- Cyrus H. Gordon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://411452]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found