|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Can anyone help me with this?
I need to read a file name using FileSystemObject in a file directory and pass it to a variable one at a time. Thanks! |
|
#2
|
|||
|
|||
|
I give u a sample that read a special directory and show the filename in this directory on the messagebox..
sub readdir(dirpath as string) dim fso as new filesystemobject dim folder dim files dim file set folder=fso.Getfolder(dirpath) set files=folder.Files for each file in files msgbox file.name next set file=nothing set files=nothing set folder=nothing set fso=nothing end sub |
|
#3
|
|||
|
|||
|
Re:How do I read file names from a directory
Thanks for your help!
![]() |
|
#4
|
|||
|
|||
|
theres no such thing called as filesystemobject!
i tryed it but it wouldnt work |
|
#5
|
|||
|
|||
|
TwProgrammer!When u call filesystem object,u should to add the reference of the MS Script Runtime for your project..
|
|
#6
|
|||
|
|||
|
project -> references -> microsoft scripting runtime
that should get you on your way ^^ |
|
#7
|
|||
|
|||
|
geez thanks alot!
|
|
#8
|
|||
|
|||
|
the files worked fine, but how do i also get folders?
|
|
#9
|
|||
|
|||
|
sub getdir(dirpath as string)
dim fso as new filesystemobject dim folder dim subfolders dim subfolder set folder=fso.Getfolder(dirpath) set subfolders=folder.subfoldes for each subfolder in subfolders msgbox subfolder.name next set subfolder=nothing set subfolders=nothing set folder=nothing set fso=nothing end sub If u will learn more kownledge,plz visit http://msdn.microsoft.com/library/d...ystemobject.asp ![]() Last edited by cleverpig : November 5th, 2003 at 06:26 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > How do I read file names from a directory |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|