Hi, first of all thank's for the help. I've tried your script, but I don't understando what I'm doing wrong, because it's not made recursive. I put the folder path as My HD. It returns the files but don't take care of the other folders.
Rodrigo on 3/21/03 9:00 AM, Fraser Campbell at [EMAIL PROTECTED] wrote: > on GetFiles(vFolderList) > > --a recursive function which goes through all of the folders > --dropped on the stage and test them for sub-folders > --if folders are added > > --check to see that that a list has been passed > --if not create one > if not listP(vFolderList) then > vFolderList = [vFolderList] > end if > > if vFolderList.count > 0 then > --go through the list of folders > repeat with i = 1 to vFolderList.count > --check to see whether there are sub-folders present > if(baFolderList(vFolderList[i]).count) > 0 then > --if there are subfolders present > --add them to a temporary list > vTempFolderList = baFolderList(vFolderList[i]) > repeat with j = 1 to vTempFolderList.count > --go through the list and rebuild the pathname > --and add them to the list of folders to be recursed > vFolderList.add(vFolderList[i] & vTempFolderList[j] & "\") > end repeat > end if > --when finished going through the folder > --get the path to the folder > vStrPath = vFolderList[i] > --get the files in the folder > vFileList = baFileList(vStrPath,"*.*") > --go through the list of the files > --if any, and add the path to the filename > if vFileList.count > 0 then > repeat with i = 1 to vFileList.count > vFileList[i] = vStrPath & vFileList[i] > end repeat > --return the file list > return vFileList > end if > end repeat > end if > > end [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
