Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub ListaArchivos(directorioinicial As String)
- Dim file As String
- Dim directoryName As String
- Dim arrayDirectorio As New String[]
- For Each directoryName In Dir(directorioinicial, "*", gb.Directory)
- 'añado al array el subdirectorio encontrado
- arrayDirectorio.add(directoryName)
- Next
- For Each directoryName In arrayDirectorio
- For Each file In Dir(directorioinicial & "/" & directoryName)
- Print "Directorio: ", directorioinicial & "/" & directoryName, "archivo: ", file
- Next
- 'ahora busco en el subdirectorio si hay más archivos... ¡¡ recursivamente !!
- ListaArchivos(directorioinicial & "/" & directoryName)
- Next
- Return
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement