To list the files (including folders) see help with Dir. After setting it
up, you just use Dir repeatedly until it returns a zero-length string.
To test if it's a folder, test:
If (GetAttr(strFile) And vbdirectory) = vbDirectory
Example of testing for a folder:
http://allenbrowne.com/func-11.html
Example of listing files recursively:
http://allenbrowne.com/ser-59.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Piotr (Peter)" <(E-Mail Removed)> wrote in message
news:20F41FAB-DB0C-4368-B0B1-(E-Mail Removed)...
> Hi,
>
> I'm writing on behalf of my colleague who needs to write a loop that opens
> folders within a folder X until no furhter folder is found in that folder
> X.
>
> Any help highly appreciated.
>
>