Loop thru files in specified directory

So surround the paths with either ' or " ?

I have never ever put a , in a path :( but can see it can be done, so you will need to do the above I believe, and amend Allen's code to do that.
Ah, that seems to work!
amended his code:
Code:
    If lst Is Nothing Then
        For Each varItem In colDirList
            Debug.Print varItem
        Next
    Else
        For Each varItem In colDirList
        lst.AddItem "'" & varItem & "'"
        Next
    End If
 
As far as I can see, those changes will not hurt any normal paths.
 

Users who are viewing this thread

Back
Top Bottom