Results 1 to 6 of 6

Thread: Printing folder shell

  1. #1

    Default Printing folder shell

    I wanted to know if it's possible to print a "shell" of a folder. I dont know how to exactly explain it, so I'll just explain what I want to do. Essentially, I want to retain the folder hierarchy in my music folder without the individual files, and print it to a file or something. I eventually would like to be able to read the output into a database. Hmm, so i guess i want a directory printer. Thanks for the help

  2. #2
    Join Date
    Jun 2008
    Location
    Moscow, Russia
    Posts
    2,995
    Blog Entries
    1

    Default Re: Printing folder shell

    Look at program "tree".

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,654
    Blog Entries
    14

    Default Re: Printing folder shell

    Set Amarok to use a MySQL database. It stores the files and folder structure with the songs. You can access that database with OpenOffice.org's Base, and use the data to create a spreadsheet, textdoc or whatever. Done this as a kind of joke some time ago. You need to install OO.o's MySQL extension for this, available through OO.o's extension installer.
    Good thing about this is, that changes in your music collection would automatically appear in your OO.o database.


    And...
    Code:
    tree -d
    does what you want.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  4. #4

    Default Re: Printing folder shell

    Thx for the help, do you know of any resources which explain the process in more detail. I will search online of course, but I was hoping for an experienced nudge in the right direction.thx

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,654
    Blog Entries
    14

    Default Re: Printing folder shell

    Open a terminal window and do like this:

    su -c 'zypper ref'
    Enter rootpassword

    su -c 'zypper in tree'
    Enter rootpassword

    This installs the 'tree' command. Once finished, you can execute the command like this:

    tree -d (meaning: show folders only).

    To get this into a text file in your homedir do:

    tree -d > ~/DirTree.txt

    Now you can open the file by

    kate ~/DirTree.txt


    If you want more info on the 'tree' command, in the same terminal window do:

    man tree
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6
    Join Date
    Jun 2008
    Location
    Moscow, Russia
    Posts
    2,995
    Blog Entries
    1

    Default Re: Printing folder shell

    Quote Originally Posted by quietthought View Post
    explain the process in more detail
    Well, it looks like



    And you can get output into a file as Knurpht said.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •