PDA

View Full Version : Generate Excel or Text File from a Directory?



Kdar
August 3rd, 2010, 03:03 PM
I have a directory where I keep all my movies (with folders for each movie inside of it). How can I general a text file or excel file from there? So that I can keep truck of what movies I have and what I do not.

RiceMonster
August 3rd, 2010, 03:08 PM
cd /video/directory/
ls -lR > movies.txt


or are you looking to do it based on tags?

Confuzius
August 3rd, 2010, 03:19 PM
You can also do it to movies.csv and excel or calc should be able to import it and save as a spreadsheet.

Kdar
August 3rd, 2010, 03:21 PM
thanks. I forgot I could send output from terminal to a file!

How can I do it with tags?

RiceMonster
August 3rd, 2010, 03:25 PM
How can I do it with tags?

You would have to find a command line program that reads video tags, and then have it recursively read all the tags of your videos. It wouldn't be as simple as doing it by file names.

Kdar
August 3rd, 2010, 03:28 PM
You can also do it to movies.csv and excel or calc should be able to import it and save as a spreadsheet.

what is movies.csv?

alphaniner
August 3rd, 2010, 03:32 PM
csv stands for comma separated values. It is a way of formatting a text file so that it can be imported by excel (etc) as a table.

wikipedia: csv (http://en.wikipedia.org/wiki/Comma-separated_values)

ajgreeny
August 3rd, 2010, 03:41 PM
csv = a file of type "comma separated values". csv files are opened by default in spreadsheets usually, ie OOo Calc in ubuntu.

LowSky
August 3rd, 2010, 03:48 PM
If you want to do it in Windows you can create a simple .bat file that will do just that

open notepad

type


dir location of info > report.xls

mine looks like this


dir C:\home\input > Report.xls
save the file as runreport.bat or whatever.bat

when it runs it should place a file name report.xls on in the same folder as the .bat.

aromo
August 3rd, 2010, 04:50 PM
try

find /video/directory -exec ls -la {} \; > report.txt