Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'd suggest first reading the 7-zip help to learn how to use it's command line interface. You'll need to understand how to run the command outside of Perl before you can incorporate that command inside your Perl code.

I believe that the general syntax that you're looking for is:

"C:\Program Files\7-Zzip\7z.exe" a -tzip my_archive.zip C:\my_data\ -r

However, putting that into your Perl code and trying to capture the output (STDOUT and/or STDERR) may be a challenge. I apologize for not being able to describe this using correct terminology. The 7z.exe is at times reusing lines in STDOUT to show progress. I could be wrong, but I think that behavior will causes challenges when trying to caputure output messages from the 7z.exe utility.


In reply to Re^3: 7zip a folder by dasgar
in thread 7zip a folder by ytjPerl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-19 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found