Answer» Hi
I would like a Batch file that read the folders and files and Export in *.TXT or *.Excel I have my movies ARRANGED such that each movie has its own folder.
Like this:
>Movies >>The Boondock Saints (1999) >>>the.boondock.saints.avi >>>Seen.txt
>>The Matrix (1999) >>>matrix.MKV >>>unseen.txt
>>Troy >>>troy.WMV >>>
After i run the Batch file it export a TXT or Excel, If the batch does not read any of TXT like the one in TROY. It display Unknown
a Filter should display All unseen first then, Second Unknown, third SEEN a Filter should display Unseen, unKnown, Seen in different colors LOL a Filter should display the Title from A-Z and Number first for example: 1234Abcd-z
The batch file need to count all Folders in Movies
Export TXT or excel in C:\
THe content of the TXT/ Excel looks Like this:
Unseen The Matrix Unknown Troy Seen Bad boys Seen The Boondock Saints (1999) Seen Titanic
TOTAL movies 3
- Is this possible ? - If I Run an batch file daily is that bad for the computer? - Does batch files also work in Windows 7. I still got XP Later upgrade to Windows 7
Thank you alll RayUnseen The Matrix Unknown Troy Seen Bad boys Seen The Boondock Saints (1999) Seen Titanic
Total movies 3 Total movies = 5Batch code can do some of the work, but you'll need an Excel macro for other parts like COLOR.
Code: [Select]@echo off set mdir=c:\temp if exist %mdir%\text.csv del %mdir%\text.csv
for /f "tokens=* delims=" %%i in ('dir %mdir% /ad /b') do ( if /i exist %%~dpnxi\seen.txt (echo Seen,%%i >> %mdir%\text.csv ) else if /i exist %%~dpnxi\unseen.txt (echo Unseen,%%i >> %mdir%\text.csv ) else (echo Unknown,%%i >> %mdir%\text.csv ) ) sort /r %mdir%\text.csv /output %mdir%\sorted.csv e:\microsoft\office\office10\excel %mdir%\sorted.csv
You need to change the path to Excel and probably the mDir variable which points to the top level movie directory. The output file (sorted.csv) is comma delimited and is easily imported to Excel.
Quote a Filter should display Unseen, unKnown, Seen in different colors LOL a Filter should display the Title from A-Z and Number first for example: 1234Abcd-z
The NT sort command does not support multiple sort keys. Use Excel instead. You can color code the data by grouping in Excel.
QuoteIf I Run an batch file daily is that bad for the computer?
No. Computer are very good at repetition. Put it to work and make your own LIFE easier.
QuoteDoes batch files also work in Windows 7. I still got XP Later upgrade to Windows 7
Batch files still run in Win7 and probably beyond for the foreseeable future. Win7 also has other tools such as VBSCRIPT (installed on Win98 forward) and Powershell (installed on Win7; add-on back to Win2000)
Good luck.
|