List of files

List of files

Post by Christopher G. Desan » Thu, 26 Feb 1998 04:00:00



Hello,

    Does anyone know how to loop through a given directory
and get ALL the filenames in that directory, as strings?

Thanks

--
Christopher G. Desany
Software Engineer
Amherst Systems, Inc.
30 Wilson Road
Buffalo, NY  14221
(716) 631-0088 x281
fax:  (716) 634-8164

 
 
 

List of files

Post by Adam Rut » Thu, 26 Feb 1998 04:00:00


Dim sFileName As String

sFileName = Dir("C:\TestPath\*.*", vbNormal)
Do While Len(sFileName) > 0
    Debug.Print sFileName
    sFileName = Dir
Loop


>Hello,

>    Does anyone know how to loop through a given directory
>and get ALL the filenames in that directory, as strings?

>Thanks

>--
>Christopher G. Desany
>Software Engineer
>Amherst Systems, Inc.
>30 Wilson Road
>Buffalo, NY  14221
>(716) 631-0088 x281
>fax:  (716) 634-8164