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, 6 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
-
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
4 minutes ago -
Security Essentials or Defender?
by
MalcolmP
7 minutes ago -
April 2025 updates out
by
Susan Bradley
6 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
2 hours, 19 minutes ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
2 hours, 22 minutes ago -
Creating an Index in Word 365
by
CWBillow
13 hours, 49 minutes ago -
Coming at Word 365 and Table of Contents
by
CWBillow
13 hours, 54 minutes ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
18 hours, 50 minutes ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
22 hours, 16 minutes ago -
W11 24H2 – Susan Bradley
by
G Pickerell
1 day ago -
7 tips to get the most out of Windows 11
by
Alex5723
22 hours, 12 minutes ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
15 hours, 34 minutes ago -
I installed Windows 11 24H2
by
Will Fastie
4 hours, 14 minutes ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
1 day, 3 hours ago -
Decisions to be made before moving to Windows 11
by
Susan Bradley
3 hours, 9 minutes ago -
Port of Seattle says ransomware breach impacts 90,000 people
by
Nibbled To Death By Ducks
1 day, 11 hours ago -
Looking for personal finance software with budgeting capabilities
by
cellsee6
20 hours, 5 minutes ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
20 hours, 20 minutes ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
2 days, 4 hours ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
2 days, 13 hours ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
1 day, 15 hours ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
1 day, 21 hours ago -
Is data that is in OneDrive also taking up space on my computer?
by
WShollis1818
2 days, 8 hours ago -
Nvidia just fixed an AMD Linux bug
by
Alex5723
4 days ago -
50 years and counting
by
Susan Bradley
22 hours, 30 minutes ago -
Fix Bluetooth Device Failed to Delete in Windows Settings
by
Drcard:))
1 day, 1 hour ago -
Licensing and pricing updates for on-premises server products coming July 2025
by
Alex5723
4 days, 11 hours ago -
Edge : Deprecating window.external.getHostEnvironmentValue()
by
Alex5723
4 days, 11 hours ago -
Rethinking Extension Data Consent: Clarity, Consistency, and Control
by
Alex5723
4 days, 11 hours ago -
OneNote and MS Word 365
by
CWBillow
4 days, 13 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.