The following VBS script will take a folder dropped on it and create a tab 
delimited file that can be opened in a spreadsheet. This is useful for 
creating playlists of music in a folder. My question is; has anyone created 
a macro that would allow a folder name to be entered directly into a 
spreadsheet cell and then create the list directly in the Calc document?




Set objShell = CreateObject("Shell.Application")
Set Ag=Wscript.Arguments
Set Fldr=objShell.NameSpace(Ag(0))
Set FldrItems=Fldr.Items
Set fso = CreateObject("Scripting.FileSystemObject")
FName="c:\documents and settings\USERNAME\my documents\Directory List.txt"
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"


-- 
Dennis

Disclaimer: The above is my opinion. I do not guarantee it. Be sure to back 
up any files involved and use at your own risk. Batteries not included. Not 
for internal use. Don't run with knives.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to