How to get the music duration of each folder and subfolder in my hard drive? The Windows Explorer displays only the duration of each music file within the folder, not the duration of each folder.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Duration of music folder (XP Home SP2)
Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » Duration of music folder (XP Home SP2)
- This topic has 14 replies, 6 voices, and was last updated 16 years, 8 months ago.
Viewing 1 reply threadAuthorReplies-
WSLeif
AskWoody Lounger -
WSDennis
AskWoody Lounger -
WSLeif
AskWoody LoungerDecember 6, 2005 at 2:32 pm #988813You might find Power Desk – an alternative to Windows Explorer – will give you the total running times. (I think it used to be free, but I’m not sure it is any longer.)
-
WSbigaldoc
AskWoody LoungerDecember 7, 2005 at 1:57 pm #988815And, if that doesn’t work out, how about this? In this post and others, I mentioned a utility called FileGrab. It’s pretty old and still works in WinXP but you will have to pay a modest fee to download a copy. FileGrab allows you to grab a selected list of files from Windows Explorer and save that list to a text file. You could do a Win Explorer search for MP3 for example, have the columns display duration, select any or all of the files in the usual manner and drag the selection to FileGrab. From there it’s an easy proposition to save the text and turn it into a spreadsheet.
If you needed to repeat the process for more than one drive or directory, that’s OK too, for FileGrab will let you keep adding to your heart’s content and save when you’re ready.
Edited With Correction: I just got around to doing a test on my suggestion and I’m sorry to say it DOES NOT work, so save yourself the trouble. It seems that FileGrab only recognizes the columns of info that were around when it was written. I dragged a bunch of files with the duration column included and it’s ignored by FileGrab. Sorry.
-
-
-
WSchrisgreaves
AskWoody LoungerSeptember 15, 2008 at 5:36 am #1125691This (Word 2000 VBA) code will dump all details of all files in a single folder to the current document.
The code dumps the total duration for the folder as the last line.
I cloned it from microsoft technet script centerSub test() Dim objshell Dim objfolder Dim arrHeaders(35) Set objshell = CreateObject("Shell.Application") Set objfolder = objshell.Namespace("D:Blotter20080913Music") Dim i For i = 0 To 34 arrHeaders(i) = objfolder.GetDetailsOf(objfolder.Items, i) Next Dim strFilename Dim dtDuration As Date For Each strFilename In objfolder.Items For i = 0 To 34 Selection.TypeText vbTab & objfolder.GetDetailsOf(strFilename, i) Next dtDuration = dtDuration + CDate(objfolder.GetDetailsOf(strFilename, 21)) Selection.TypeText vbCrLf Next Selection.TypeText dtDuration & vbCrLf End Sub
-
byteme
AskWoody PlusSeptember 16, 2008 at 6:51 am #1125849I was inspired to try to add a cut-down version of this (in the form of a VBScript) to Explorer’s right-click menu, but when I try to run the script from the right-click menu, a dialog box pops up that shows the name of the folder and says “Access is denied.”
It looks like I can run the script from a batch file and assign the batch file to the right-click menu item, but that seems goofy (and it means you get a gratuitous command window popping up). Anybody know why I can’t run the script directly from Explorer’s right-click menu, and if that’s fixable?
-
WSchrisgreaves
AskWoody Lounger -
byteme
AskWoody PlusSeptember 16, 2008 at 7:35 am #1125854Here are Microsoft’s official instructions.
-
WSchrisgreaves
AskWoody LoungerSeptember 16, 2008 at 10:51 am #1125884>Here are Microsoft’s official instructions.
Thanks st3333ve
I got a bit of a scare when my printer sprinted into life – serves me right for pasting the batch file without reading it to see what it did!
I followed steps 1 &2 and it worked. I can’t see why step 3 is required.>Anybody know why I can’t run the script directly from Explorer’s right-click menu
Have you been able to run any script from r/c? -
byteme
AskWoody PlusSeptember 16, 2008 at 11:16 am #1125885If you don’t do step 3, you may well find that double-clicking on a folder (in Explorer) triggers a result other than “Open” — because the default action tends to get screwed up when you make other adjustments (like adding a new menu item). I installed Service Pack 3 last week, and am I surprised that Microsoft has never gotten around to fixing that annoying bug? No, I am not surprised. Not surprised in the least, really. Actually, come to think of it, if they had fixed the bug, I would have been surprised.
As for your 2nd question: No, no script will run. I made a one-line test script (MsgBox “Howdy”) and got the same “Access is denied” result — and it doesn’t matter whether I use WScript or CScript as the processor.
I should add that Windows adds “percent-symbol 1″ to the end of the command line (if you don’t), and the “Access is denied” error dialog I’m getting always displays the name of the folder I right-clicked — even when, as in my one-line test script, the script itself isn’t trying to actually access the folder.
I’m guessing it’s a security thing, although if that’s the case it seems goofy that I can get around the security by simply turning the command line into a batch file and then running the batch file from the right-click menu.
-
WSchrisgreaves
AskWoody LoungerSeptember 16, 2008 at 10:59 pm #1125928>If you don’t do step 3 …
OK. I went to do it and found (“In the Value data box, type none.”) that my value was already “none”>… Windows adds “percent-symbol 1” … name of the folder I right-clicked –
This sounds to me like half-baked code, the sort that gets released with a few odds and ends left unfinished – debugging code in place – when a programmer is yanked off a module before it is tidied up. The module remains frozen in it 95% state forever. I’ve worked on projects like that.>seems goofy … then running the batch file
Take heart.
Some of my finest stuff still runs from a batch file, quietly, no fanfare, during boot time or to drive useful applications. I get used to seeing the black window appear, but enjoy getting on with what i have to do.I quite agree it seems strange that a script cannot be hooked on to a r/c menu, whereas an executable can be hooked.
-
byteme
AskWoody Plus -
WSHansV
AskWoody LoungerSeptember 17, 2008 at 4:02 am #1125978 -
byteme
AskWoody Plus
-
-
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
24H2 has suppressed my favoured spider
by
Davidhs
7 minutes ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
7 hours, 46 minutes ago -
MS Office 365 Home on MAC
by
MickIver
1 hour, 35 minutes ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
21 hours, 49 minutes ago -
Flash Drive Eject Error for Still In Use
by
J9438
23 hours, 22 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
1 day, 16 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
1 day, 16 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
20 hours, 21 minutes ago -
Migrate off MS365 to Apple Products
by
dmt_3904
21 hours, 10 minutes ago -
Login screen icon
by
CWBillow
11 hours, 32 minutes ago -
AI coming to everything
by
Susan Bradley
17 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
2 days, 8 hours ago -
No Screen TurnOff???
by
CWBillow
2 days, 8 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
2 days, 9 hours ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
2 days, 20 hours ago -
How well does your browser block trackers?
by
n0ads
2 days, 7 hours ago -
You can’t handle me
by
Susan Bradley
5 hours, 57 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
1 day, 23 hours ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
3 days, 8 hours ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
2 days, 11 hours ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
3 days, 8 hours ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
3 days, 8 hours ago -
Lumma malware takedown
by
EyesOnWindows
2 days, 20 hours ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
3 days, 17 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
3 days, 17 hours ago -
Meet Gemini in Chrome
by
Alex5723
3 days, 21 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
3 days, 21 hours ago -
Trump signs Take It Down Act
by
Alex5723
4 days, 5 hours ago -
Do you have a maintenance window?
by
Susan Bradley
2 days, 10 hours ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
3 days, 7 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.