Print directory structure

  • Thread starter Thread starter Tiger
  • Start date Start date
T

Tiger

I am looking for a utility for Windows XP that can also print the extra
columns such as 'Duration' for mpeg videos or 'Date Taken' for digital
photos etc. but can't find a tool that can do that, they only seem to print
the basic directory info. Is there any tool that can do this?

TIA
 
Create a text document and paste below lines in. Rename it something.vbs. Use it by dropping a folder on the file. You'll need to edit the path (4th line) as you are unlikely to have a user with my name. Because I do not know how many columns you have installed I queried for the first 51 properties (which should be ample). Import into Excel to use or print and delete the empty columns at the end and most files have less than 10 properties.



Set objShell = CreateObject("Shell.Application")
Set Ag=Wscript.Arguments

'Set Fldr=objShell.NameSpace("c:\documents and settings\David Candy\my documents")
Set Fldr=objShell.NameSpace(Ag(0))

Set FldrItems=Fldr.Items
Set fso = CreateObject("Scripting.FileSystemObject")

'FName=fso.GetTempName
FName="c:\documents and settings\David Candy\Desktop\Folder Property List.txt"
'fso.CreateTextFile FName
'Set f = fso.GetFile(FName)
Set ts = fso.OpenTextFile(FName, 2, vbtrue)



For x = 0 to 50
t1 = t1 & Fldr.GetDetailsOf(vbnull, x) & vbtab
Next
ts.write FLDR.self.path &vbcrlf
ts.Write T1 & vbcrlf
T1=""


For Each FldrItem in FldrItems
For x = 0 to 50
t1 = t1 & Fldr.GetDetailsOf(FldrItem, x) & vbtab
Next
t1=t1 & vbcrlf
ts.Write T1
T1=""
Next

msgbox FName & "has a tab delimited list of all properties"
 
Thanks a lot David, works like a charm!

Create a text document and paste below lines in. Rename it something.vbs.
Use it by dropping a folder on the file. You'll need to edit the path (4th
line) as you are unlikely to have a user with my name. Because I do not know
how many columns you have installed I queried for the first 51 properties
(which should be ample). Import into Excel to use or print and delete the
empty columns at the end and most files have less than 10 properties.



Set objShell = CreateObject("Shell.Application")
Set Ag=Wscript.Arguments

'Set Fldr=objShell.NameSpace("c:\documents and settings\David Candy\my
documents")
Set Fldr=objShell.NameSpace(Ag(0))

Set FldrItems=Fldr.Items
Set fso = CreateObject("Scripting.FileSystemObject")

'FName=fso.GetTempName
FName="c:\documents and settings\David Candy\Desktop\Folder Property
List.txt"
'fso.CreateTextFile FName
'Set f = fso.GetFile(FName)
Set ts = fso.OpenTextFile(FName, 2, vbtrue)



For x = 0 to 50
t1 = t1 & Fldr.GetDetailsOf(vbnull, x) & vbtab
Next
ts.write FLDR.self.path &vbcrlf
ts.Write T1 & vbcrlf
T1=""


For Each FldrItem in FldrItems
For x = 0 to 50
t1 = t1 & Fldr.GetDetailsOf(FldrItem, x) & vbtab
Next
t1=t1 & vbcrlf
ts.Write T1
T1=""
Next

msgbox FName & "has a tab delimited list of all properties"
 
You are good, David! <w>




Create a text document and paste below lines in. Rename it something.vbs.
Use it by dropping a folder on the file. You'll need to edit the path (4th
line) as you are unlikely to have a user with my name. Because I do not know
how many columns you have installed I queried for the first 51 properties
(which should be ample). Import into Excel to use or print and delete the
empty columns at the end and most files have less than 10 properties.



Set objShell = CreateObject("Shell.Application")
Set Ag=Wscript.Arguments

'Set Fldr=objShell.NameSpace("c:\documents and settings\David Candy\my
documents")
Set Fldr=objShell.NameSpace(Ag(0))

Set FldrItems=Fldr.Items
Set fso = CreateObject("Scripting.FileSystemObject")

'FName=fso.GetTempName
FName="c:\documents and settings\David Candy\Desktop\Folder Property
List.txt"
'fso.CreateTextFile FName
'Set f = fso.GetFile(FName)
Set ts = fso.OpenTextFile(FName, 2, vbtrue)



For x = 0 to 50
t1 = t1 & Fldr.GetDetailsOf(vbnull, x) & vbtab
Next
ts.write FLDR.self.path &vbcrlf
ts.Write T1 & vbcrlf
T1=""


For Each FldrItem in FldrItems
For x = 0 to 50
t1 = t1 & Fldr.GetDetailsOf(FldrItem, x) & vbtab
Next
t1=t1 & vbcrlf
ts.Write T1
T1=""
Next

msgbox FName & "has a tab delimited list of all properties"
 
It can also go into sendto.

Also changing one character

Set ts = fso.OpenTextFile(FName, 2, vbtrue)
to
Set ts = fso.OpenTextFile(FName, 8, vbtrue)

allows appending so then this will work to

for /r "c:\program files\adobe" %A in (.) do start /w "" "C:\Documents and Settings\David Candy\Desktop\PrintDetails.vbs" "%A"

This walks the tree starting at c:\program files\adobe in the example. One may wish to add 50 tabs to the end of the folder name but excel handles it without the tabs (didn't try access, word will not handle it).

ts.write FLDR.self.path & vbtab & vbtab & (do it 50 times) & vbcrlf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top