To preface, I have a folder named MOVIES that I store all of my movie files in. Within that folder are subfolders for each letter of the alphabet, the # sign (for movies that begin with a number or other non-alphabetic character), and a folder named MUSIC RELATED (for music related movies.)
I made the batchfile to by default, output a folder label, which is the letter of the alphabet that is the folder name, surrounded by dashes to make it very easy to see the next letter in the output file. I can also provide the argument /nolabels to output without the folder labels, but that's beside the point.
OUTPUT EXAMPLE:
- - - - - - - - - MUSIC RELATED - - - - - - - -
VAN HALEN LIVE SHOWS <--- This is a sub-folder that contains what it is named. Only the folder name is output, not its contents)
AC-DC - Let There Be Rock [1980].mp4
Mayor Of The Sunset Strip [2003].mp4
Mayor Of The Sunset Strip [2003].srt
Searching For Sugar Man [2012].idx
Searching For Sugar Man [2012].mp4
Searching For Sugar Man [2012].sub
- - - - - - - - # - - - - - - - -
2001 - A Space Odyssey [1968].mp4
2001 - A Space Odyssey [1968].srt
The 40 Year Old Virgin (Unrated ) [2005].mp4
The 40 Year Old Virgin (Unrated ) [2005].srt
- - - - - - - - A - - - - - - - -
A Street Cat Named Bob [2016].idx
A Street Cat Named Bob [2016].mp4
A Street Cat Named Bob [2016].sub
Airplane! [1980].mkv
Airplane! [1980].srt
... Etc ...
I have a batchfile that adds the names of movies to a plain text file, of all the folders and movie files within the folder that the batchfile is run from.
To make it clear, I have a folder full of movies with names such as the following:
EXAMPLE OUTPUT FROM EXISTING BATCHFILE:
- - - - - - - - - MUSIC RELATED - - - - - - - -
VAN HALEN LIVE SHOWS
AC-DC - Let There Be Rock [1980].mp4
Mayor Of The Sunset Strip [2003].mp4
Mayor Of The Sunset Strip [2003].srt
Searching For Sugar Man [2012].idx
Searching For Sugar Man [2012].mp4
Searching For Sugar Man [2012].sub
The batchfile works perfectly, except that ideally, I would like for the .srt, .idx, and .sub (files that contain the subtitles for each movie) to NOT be included in the resulting text file output.
EXAMPLE OUTPUT OF THE DESIRED MODIFIED NO SUBTITLES BATCHFILE:
- - - - - - - - - MUSIC RELATED - - - - - - - -
VAN HALEN LIVE SHOWS
AC-DC - Let There Be Rock [1980].mp4
Mayor Of The Sunset Strip [2003].mp4
Searching For Sugar Man [2012].mp4
Ideally, I would like to have the same batchfile do this, but if need be, I could run my existing batchfile, then run a different batchfile to process the output text file from the first to achieve my desired result.
I am not against using an external program, such as the awesome Notepad++, from within the batchfile to do some processing if need be. But if possible, it would be great to not use anything but the batchfile itself, or themselves, to accomplish everything.
I don't know how to check each output line for a certain ending, and to not output that line if it finds a match to any of the following endings:
.idx
.sub
.srt
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PART 2
I would also like to add another argument named /noext that would output everything the same, but strip off the file extension part of each movie.
EXAMPLE OUTPUT WITH THE /noext ARGUMENT SPECIFIED:
- - - - - - - - - MUSIC RELATED - - - - - - - -
VAN HALEN LIVE SHOWS
AC-DC - Let There Be Rock [1980]
Mayor Of The Sunset Strip [2003]
Searching For Sugar Man [2012]
I think I know how to do everything except how to strip off the file extensions for this part.
Attached is my batchfile as-is.
Any help is greatly appreciated?
- Thaum