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
Look at program “tree”.
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…
tree -d
does what you want.
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
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
Well, it looks like
ImageShack - Best place for all of your image hosting and image sharing needs](ImageShack - Best place for all of your image hosting and image sharing needs)
And you can get output into a file as Knurpht said.