Click here to download: vidtime.bat

You may find this windows batch script useful if you have a large collection of video files. It creates a sorted listing of all the video files in the current folder (and all subfolders). Each line lists one video file with the following information about the file (in this order): The script displays a dot on the console for every video file processed to let you know that the script is still running. When all the files have been processed the file count as well as the totals for Duration and File size are displayed. These totals are also included as the first line of the result file which is always named vidtime.txt in the current folder.

Here is a sample output file. When the script was invoked, the current folder contained 10 video files and no subfolders:

************* Total run time 12:22:26 ******************* 10 video files, 4.8 GB 
00:01:02   221 kbs  mpeg1   320x240      1 MB  .wmv  ---  Anticipation
01:20:16  1045 kbs  h264   1280x720    629 MB  .mp4  ---  Before Sunset 2004
00:05:15   531 kbs  flv1    640x480     20 MB  .flv  ---  Benjamin Franklin
01:48:00   993 kbs  h264   1280x536    804 MB  .mp4  ---  Ex Machina 2015
00:01:12   204 kbs  msvid   240x180      1 MB  .mov  ---  Indecent Proposal
01:34:34  1037 kbs  h264   1280x720    736 MB  .mkv  ---  Inside Out 2015
01:16:23   550 kbs  mpeg4   720x288    315 MB  .avi  ---  Lady and the Tramp 1955
02:29:46   561 kbs  mpeg2   720x304    630 MB  .avi  ---  Lincoln 2012
01:42:49   947 kbs  wmv3    988x720    730 MB  .avi  ---  Singin in the Rain 1952
02:03:09  1048 kbs  h264   1280x528    968 MB  .mp4  ---  The Walk 2015

For this script to run, you must have these two additional files:

sed.exe Go to and download the "Binaries" zip file. Extract sed.exe from the bin folder and put it anywhere to like as long as it is on your path. (This the only file you need from the archive.) Other versions of sed may work, although I only tested it with GNU sed.
ffprobe.exe Go to and click on the appriopiate one of these two buttons (almost always 64-bit these days)
    Download FFmpeg 32-bit Static
    Download FFmpeg 64-bit Static
Extract ffprobe.exe from the bin folder and put it anywhere you like as long as it is on your path. (This is the only file you need from the archive.)

If this script or the scripts described below produce results you don't expect, try commenting out the last line ("del") which deletes all the temporary files. Viewing those temporary files may help you figure out what went wrong.


Click here to download: mp3time.bat

This script is similar to the previous one except that it looks for mp3 audio files instead of video files. As with the previous script, you also must have sed and ffprobe. The result file is always named mp3time.txt in the current folder.

I have tested this script with a collection containing over 100,000 files, but below is a sample output file from a much smaller collection. When the script was invoked, the current folder contained 2 folders each of which contained six mp3 files. The number after the audio duration is the bitrate in kilobits per second:

****** 12 mp3 files ************** 4:09:24 Total run time, 289 MB ************ 
00:02:45   64K   1.32 MB  ---  Live\Advice to Little Girls
00:22:33  128K  21.65 MB  ---  Live\Cannibalism in the Cars
00:02:26  256K   4.68 MB  ---  Live\No Two People
00:38:56  128K  37.37 MB  ---  Live\Stolen White Elephant
00:28:11  128K  27.07 MB  ---  Live\Taming the Bicycle
00:31:47   64K  15.25 MB  ---  Live\Travelling with a Refomer
00:02:40  256K   5.13 MB  ---  Visit\Bloop Bleep
00:04:08   96K   2.98 MB  ---  Visit\Buying a House
00:20:15  128K  19.44 MB  ---  Visit\Dogs Tale
00:02:42  256K   5.20 MB  ---  Visit\Little White Duck
00:02:15  192K   3.29 MB  ---  Visit\Mental Makeup
01:30:46  213K 145.23 MB  ---  Visit\Rough Around the Edges


Click here to download: audiotime.bat

If your audio collection contains only mp3 files (by far the most popular audio format) then you will probably prefer the previous script, but if you use any of the alternative audio formats then this is the script you want. The result file is always named audiotime.txt in the current folder.

Here is a sample output file. When the script was invoked, the current folder contained 9 audio files using each of the 9 audio formats supported by audiotime.bat:

********* 9 audio files *********** 0:29:31 Total run time, 120 MB *********** 
00:03:10  780K  18.56 MB  .ape  ---  Track 1 (monkeys lossless audio) 
00:03:48  889K  25.44 MB  .flac ---  Track 2 (free lossless audio) 
00:01:52  195K   2.73 MB  .mpc  ---  Track 3 (musepack) 
00:05:02   64K   2.42 MB  .mp2  ---  Track 4 (mpeg1 layer2) 
00:01:52  256K   3.59 MB  .mp3  ---  Track 5 (mp3) 
00:02:36  901K  17.65 MB  .m4a  ---  Track 6 (mpeg4 audio) 
00:04:14  214K   6.81 MB  .ogg  ---  Track 7 (ogg vorbis) 
00:03:45 1411K  39.69 MB  .wav  ---  Track 8 (windows wav lossless) 
00:03:12  129K   3.11 MB  .wma  ---  Track 9 (windows media audio) 

Feel free to email me (at the address shown on my home page) with any questions or comments you may have about these scripts. Also if you encounter an audio or video file that causes the script to behave inappropriately, I would be grateful if you let me know.

Hits since 13-Jan-2016: