Showing posts with label zip. Show all posts
Showing posts with label zip. Show all posts

How to create ZIP archive with relative paths

One question in SE site give me idea how to zip folder w/o including the current directory in the path. Here is the question:
I have a directory called folder that looks like this:
folder
      -> root_folder
                    -> some files
I want to zip this directory into zipped_dir..


And the answer I found was sample and effective:

Try to use this command (you will get the idea)
cd folder; zip -r ../zipped_dir.zip *
Maybe there is other way, but this is fastest and simplest for me :)

The lesson is that people must learn how to use relative directories :)
P.S. Here is the link to the Q/A in SE .

Should I trust AI

 Should I trust AI? So far no, sorry.  I tested for the moment (May, 2025) most advanced model for programming and ask very simple question:...