1 Attachment(s)
More Robust Directory List Generator?
Fellow Forum Members,
Attached is a XLA file that generates a list of all filenames and associated subdirectories. It includes details such as NAME, DATE and SIZE. In addition, the filenames are hyperlinked to the actual file. In short, it's a very handy little tool that was created by someone who gave it away for free and who no longer supports this tool.
Is it possible to modify this XLA file so that it goes beyond just including NAME, DATE, and SIZE details? I would like it to include any of the details I have selected (checked off) inside the Windows7 Explorer "Choose Details" dialog window.
For example, I'm interested in generating a file list that includes the following details:
NAME, DATE, SIZE, LENGTH, 35mm FOCAL LENGTH, WIDTH
If this XLA tool can't be modified, is there a similar Excel 2007 add on tool that will support inclusion of the more exotic file details such as LENGTH and WIDTH in a list that is hyperlinked? Any help will be greatly appreciated
Followup with Screenshots
Quote:
Originally Posted by Kenneth Hobs
Obviously, you need to remove the "=" from your MsgBox line.
You can do all of that but do each part and then check.
When I get time, I will help you with more specific examples. Most of the work has already been done for you.
I know that an AVI file type has a duration. To test the duration, I am lazy and just poked the duration value into column A. Save a workbook and add:
[vba]Sub snb()
Dim fl As Variant
Dim i As Long
i = 2
Range("C7").Value2 = ThisWorkbook.Path
For Each fl In CreateObject("scripting.filesystemobject").getfolder(Range("C7").Value).Fil es
With CreateObject("shell.application").Namespace(Range("C7").Value & "\")
Range("A" & i).Value2 = .getdetailsof(.Items.Item(Dir(fl)), 21) 'Duration
End With
i = i + 1
Next
End Sub
[/vba]
Kenneth,
Thanks for your post.
Just an update. I tested your code with my Excel 2007. I entered the path in Cell C7 and hit the LIST button and it didn't work. The only thing that happened was the path in Cell C7 changed to something else. Still trying to figure out what is happening. I'm going to try it again tomorrow where I work.
Moreover, I have posted 3 PNG files that show Detail Parameters I'm interested in and also show how they appear within my Windows7 Windows Explorer. One PNG is for Music, and the other PNG is for Video. The third PNG file shows the "Choose Details" dialog window. What is worth noting is how it offers both DURATION and LENGTH. I'm not sure what the difference is between the two but I picked both and what seems to work correctly is the LENGTH Detail Parameter. I'm pointing this out because I have noticed SNB's webpage shows code for DURATION but none for LENGTH. So I'm now wondering whether LENGTH is supported with any code.
As you can see from my screen captures there are a multitude of File Detail Parameters to pick from inside the "CHOOSE DETAILS" dialog window. I'm only interested in a few. Nevertheless, do you think Excel VBA coding is able to support any of the Detail Parameters listed within the "CHOOSE DETAILS" dialog window as long as they are checked off? Just curious to know. Any help you can provide will be greatly appreciated. Thanks. :hi:
http://img855.imageshack.us/img855/1...parameters.png
http://img36.imageshack.us/img36/355...parameters.png
http://img441.imageshack.us/img441/1...dialogwind.png