It is currently Sun 18 Aug, 2019 12:04 am • View unanswered postsView active topics

Xubuntu Index Files and Folders via TXT


Xubuntu Index Files and Folders via TXT

Postby qazxsw21000 » Tue 02 Jul, 2013 1:08 am

So I decided to make an index of my music collection. I then decided to index my dad's music collection. The following code works in Ubuntu (I'm not sure what the earliest version is (all?) it'll work in). It will read a directory and save all subfolders and files within that directory to a text file. The names will also be in alphabetical order.
Code: Select all
ls directory -R --group-directories-first --ignore="*.jpg" --ignore="*.ini" --ignore="*.db" > save_path/name


This code will not list any JPG, INI, nor DB files. That text file where I indexed my dads music, it's 2.2 MB large. The code lists all subfolders before the actual files. It will then go through and list what's in the subfolders (and subfolders within).

./Absynthe Minded:
Acquired Taste

./Absynthe Minded/Acquired Taste:
01 - I Am A Fan.mp3
02 - I've Been There (Old Love Never Dies).mp3
03 - Acquired Taste.mp3
04 - Copy In Black And White.mp3
05 - Conversation Strike Error.mp3
06 - People Of The Pavement.mp3
07 - Out Of The Piano.mp3
08 - In Her Head.mp3
09 - It Could Be.mp3
10 - Let's Go.mp3
11 - Twisted.mp3
12 - (That's A) Lousy Story.mp3
13 - Walk With Me.mp3

./Acceptance:
Acceptance - Phantoms - 10 - In the Cold.mp3
Acceptance - Phantoms - 11 - Permanent.mp3
Acceptance - Phantoms - 12 - Glory_Us.mp3
Acceptance - Phantoms - 1 - Take Cover.mp3
Acceptance - Phantoms - 2 - So Contagious.mp3
Acceptance - Phantoms - 3 - In Too Far.mp3
Acceptance - Phantoms - 4 - The Letter.mp3
Acceptance - Phantoms - 5 - Different.mp3
Acceptance - Phantoms - 6 - Ad Astra Per Aspera.mp3
Acceptance - Phantoms - 7 - This Conversation is Over.mp3
Acceptance - Phantoms - 8 - Over You.mp3
Acceptance - Phantoms - 9 - Breathless.mp3
"Analogies are like sandwiches in that I'm making one now."
Does a set of all sets contain itself?
This statement is false!
Your next task: Refuse this task
User avatar
qazxsw21000
 
Posts: 1501
Images: 18
Joined: Sat 06 Aug, 2011 10:37 pm
Location: London, KY


  • Advertisement

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron