DOS DIR and length

  • Thread starter Thread starter Frank C
  • Start date Start date
F

Frank C

My mp3 music files include a length which is the playing time in minutes and
seconds. I have a simple .bat file to direct the output of DIR to a file. I
input this to a Excel spread sheet to make a track list. I would like to get
the length so the spread sheet would include the lenght, then I could sum the
total time.
How do I get DOS DIR to include the lenght field?
Thanks
--
Frank C
Dell Inspiron 530S
Win Vista Ultimate 64 bit SP1
Dell studio laptop
Win Vista Ultimate 64 bit SP1
HP Photosmart D7260
 
Frank C said:
My mp3 music files include a length which is the playing time in minutes and
seconds. I have a simple .bat file to direct the output of DIR to a file. I
input this to a Excel spread sheet to make a track list. I would like to get
the length so the spread sheet would include the lenght, then I could sum the
total time.
How do I get DOS DIR to include the length field?

AFAIK, you don't. The "dir" command can retrieve file attributes that
are stored in the directory entry: hidden, system, archive, read-only.
Getting the time from an mp3 file involves reading the file and
parsing the contents. That's beyond dir's capabilities.
 
AFAIK, you don't. The "dir" command can retrieve file attributes that
are stored in the directory entry: hidden, system, archive, read-only.
Getting the time from an mp3 file involves reading the file and
parsing the contents. That's beyond dir's capabilities.

You can approximate it by calculating against the file size parameter.
Run a few MP3's, average the time they take vs size, set up a
calculation in the spreadsheet.
 
+Bob+ said:
You can approximate it by calculating against the file size parameter.
Run a few MP3's, average the time they take vs size, set up a
calculation in the spreadsheet.

And this will only be valid if all the MP3s were ripped at the same bitrate
 
Back
Top