Using the dir function, I can obtain the list of files in a specified folder:
What I am having a tortuous experience with is obtaining the list of files from all the subfolders (and the names of the subfolders) within "mypath". I also need the level at which a file is found. So, if the file is "c:\myfile.txt", the level is 1. If it is c:\temp\myfile.txt, the level is 2.
Can you give me any suggestions? Thanks in advance!! Mike K
Code:
sub myproc()
dim mypath as string, myfile as string
mypath="c:\"
myfile=dir(mypath)
do until myfile=""
msgbox myfile
myfile=dir
loop
end myproc
Can you give me any suggestions? Thanks in advance!! Mike K