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, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
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, 7 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
-
Google won’t remove 3rd party cookies in Chrome as promised
by
Alex5723
5 minutes ago -
Microsoft Manager Says macOS Is Better Than Windows 11
by
Alex5723
1 hour, 14 minutes ago -
Outlook (NEW) Getting really Pushy
by
RetiredGeek
25 minutes ago -
Steps to take before updating to 24H2
by
Susan Bradley
2 hours, 36 minutes ago -
Which Web browser is the most secure for 2025?
by
B. Livingston
2 hours, 39 minutes ago -
Replacing Skype
by
Peter Deegan
3 hours, 5 minutes ago -
FileOptimizer — Over 90 tools working together to squish your files
by
Deanna McElveen
3 hours, 56 minutes ago -
Excel Macro — ask for filename to be saved
by
nhsj
3 hours, 33 minutes ago -
Trying to backup Win 10 computer to iCloud
by
SheltieMom
1 day, 11 hours ago -
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
2 days, 1 hour ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
2 days, 2 hours ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
2 days, 3 hours ago -
No April cumulative update for Win 11 23H2?
by
Peobody
15 hours ago -
AugLoop.All (TEST Augmentation Loop MSIT)
by
LarryK
2 days, 3 hours ago -
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
2 days, 18 hours ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
2 days, 22 hours ago -
Inetpub can be tricked
by
Susan Bradley
1 day, 5 hours ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
1 day, 16 hours ago -
FBI 2024 Internet Crime Report
by
Alex5723
3 days, 1 hour ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
11 hours ago -
Login issues with Windows Hello
by
CWBillow
3 days, 13 hours ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
3 days ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
4 days ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
4 days ago -
Google AI is now hallucinating idioms
by
Alex5723
4 days, 1 hour ago -
april update
by
69800
2 days, 5 hours ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
4 days, 2 hours ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
4 days, 2 hours ago -
WuMgr not loading?
by
LHiggins
2 days, 22 hours ago -
Word crashes when accessing Help
by
CWBillow
12 hours, 16 minutes 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.