Insert folder structure in document

In a document I want to describe the contents of a hypothetic zip file. How do I make a nice-looking file/directory structure similar to those one might find at the left side of an Explorer window? Icons are not needed, lines will be solid.

I tried with box-drawing characters, but the lines never meet up nicely (gaps or overlaps). I tried with dual-rowed tables, but it’s not very maintainable with a fragile mess of borders and merged cells. I considered using Draw or SVG but it’s hard or inconvenient to maintain. Images (screenshots) of a mock-up directory structure will be rasterized and blurry so I don’t even consider that.

Isn’t there a kind of tree structure that I can just ‘insert’ in the document or a Draw document, similar to how I can insert tables?

Remember that most fonts are made of glyphs with unequal width (an “m” is wider than an “i”). Consequently, trying to draw some kind of chart is doomed to failure, or anyway will face huge maintenance problems.

You can of course make a diagram as a set of linked text boxes in Draw but you’ll spend a considerable lot of time tuning it until it looks satisfactory.

The best you can do is to switch to some paragraph style with a fixed-width font such as built-in Preformatted Text (which uses Liberation Mono on my Linux box). See an example below. Note that I ended the lines with newlines (Shift+Enter) instead of paragraph marks (Enter) so that I have no extra spacing between lines, while keeping “standard” spacing above and below the paragraph.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

As ajlittoz pointed out you can create the structure as plain text. Use cmd shell (Windows) or terminal (Linux) for that. There is a “simple” command for it: tree

Redirect the output in a new file like this: tree myfolder > myfolder.txt - before that you have to expand your ZIP file in regular folders/files.

Please note: In Linux you probably have to install the tree command from repositories, in Windows 10 the redirection has got a failed format (for inserting in Writer) so that it is better to use another app for that. You will find links to some of them on internet forums.