|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Directory ListingI've created this code before and I lost it so I'm trying to recreate
it. I want to programmically create a txt file that contains a list of the contents of a directory (both file name and size). I know how to generate the output file but I'm having some difficulty capturing the data to output. In the past I've done something with a FileSystemObject I believe (not positive) and I'm drawing a blank on getting started. FYI...I'm using VB6 (still, I know). Thanks Jeff "Jeff Harbin" <prez1***@sbcglobal.net> wrote in message s=dir$(path & "\*.*",vbhidden or vbsystem)news:YJkpl.12835$8_3.8034@flpi147.ffdc.sbc.com... > I've created this code before and I lost it so I'm trying to recreate it. > I want to programmically create a txt file that contains a list of the > contents of a directory (both file name and size). do while len(s)>0 txtList.text=txtlist.text & s & " (" & filelen(path & "\" & s) & ")" & vbcrlf s=dir$ loop > I know how to generate the output file but I'm having some difficulty generate the output file? huh?> capturing the data to output. > In the past I've done something with a FileSystemObject I believe (not The FSO is for scripting; it has no place in a VB app unless it's throwaway > positive) and I'm drawing a blank on getting started. code > FYI...I'm using VB6 (still, I know). Nothing wrong with still using VB6. It's a heck of a lot more fun, and IMO productive, than anything that came after it. |
|||||||||||||||||||||||