Jump to content

Make a list?


Recommended Posts

Is there anyway to make a list of files that are in a share?

 

I want to get a list of every movie in the movie share and short of manually writing 2000+ file named out in a txt file I don't know how to do it...

 

Any one got a solution they care to share?

I use this;  (All my movies are .iso,.ISO,.avi, or .AVI files and in a user share named "Movies")

 

find /mnt/user/Movies \( -name *.iso -o -name *.ISO -o -name *.avi -o -name *.AVI \) -print | cut -c18- |

sed -e "s/_/ /g" -e "s/\.ISO$//" -e "s/\.iso$//" -e "s/\.avi$//" -e "s/\.AVI$//" |

sort -f | tr "[A-Z]" "[a-z]" | /boot/capitalize > /boot/dvd_list.txt

 

/boot/capitalize looks like this:  (where [  -] = [space tab-]

#! /bin/sed -f

 

s/^/ /

s/\([  -]\)a/\1A/g

s/\([  -]\)b/\1B/g

s/\([  -]\)c/\1C/g

s/\([  -]\)d/\1D/g

s/\([  -]\)e/\1E/g

s/\([  -]\)f/\1F/g

s/\([  -]\)g/\1G/g

s/\([  -]\)h/\1H/g

s/\([  -]\)i/\1I/g

s/\([  -]\)j/\1J/g

s/\([  -]\)k/\1K/g

s/\([  -]\)l/\1L/g

s/\([  -]\)m/\1M/g

s/\([  -]\)n/\1N/g

s/\([  -]\)o/\1O/g

s/\([  -]\)p/\1P/g

s/\([  -]\)q/\1Q/g

s/\([  -]\)r/\1R/g

s/\([  -]\)s/\1S/g

s/\([  -]\)t/\1T/g

s/\([  -]\)u/\1U/g

s/\([  -]\)v/\1V/g

s/\([  -]\)w/\1W/g

s/\([  -]\)x/\1X/g

s/\([  -]\)y/\1Y/g

s/\([  -]\)z/\1Z/g

s/^.//

Link to comment

find /mnt/user/Movies \( -name *.iso -o -name *.ISO -o -name *.avi -o -name *.AVI \) -print | cut -c18- |

sed -e "s/_/ /g" -e "s/\.ISO$//" -e "s/\.iso$//" -e "s/\.avi$//" -e "s/\.AVI$//" |

sort -f | tr "[A-Z]" "[a-z]" | /boot/capitalize > /boot/dvd_list.txt

Never ask a programmer for a simple solution ;)

Link to comment

I like Joes, you could set it to run daily or weekly via cron to keep an up to date list automagically, and keeps the solution on the server(big plus for me, I do not like having to use one pc to do something on another, but that's a personal quirk)

 

Joe, I challenge you to add mediainfo to your script to print the video and audio types

 

Ok, that challenge is because it would save me from figuring it out, >:D, you can ignore it, ;D

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...