recursive scanning of files in a folder
Posted: Tue Nov 24, 2009 7:22 pm
hi all,
i'm in deep loss as to how i can make a simple system where it parses each files inside a folder one by one. i need recursion in this such as the example below:
see, when i set "My Folder to Scan" as the folder to be scanned, there should be a handler like the one below that should be called for each file inside the set folder as well as all the other folders under it, so called recursive scanning.
let's just say this system is to check each and every file inside a set folder.
i tried the example located at the Resource Center of Revolution. it works but it uses repeat loops and repeat loops are often times uninterruptable by, e.g.: clicking a cancel button to stop the scanning. so i thought doing it via dispatch or send command would be better but Lord knows i've tried my best to attempt converting the sample found in the Resource Center about recursion in Files and Folders and still haven't been able to make it work. i seem to get overwhelmed by so much functions and commands!
can anybody help me with this one? if anybody has already made a library stack for this sort, would you please share it with me? i'm at my wit's end here to some extent. 
BTW: i absolutely adore the new and improved board, phpBB3 am i right? and also the "File Attachment" feature is absolutely great!
i'm in deep loss as to how i can make a simple system where it parses each files inside a folder one by one. i need recursion in this such as the example below:
Code: Select all
,-My Folder to Scan
|-- File 1
|-- File 2
|-- File 3
|-- Another Folder
|-- File 4
|-- File 5
'-- File 6
|-- Folder No. 2
|-- File 7
'-- File 8
... and so on.
Code: Select all
on doSomething pFile
// My Code here
end doSomething
pFile is supposed to contain the full path to one of the files inside the chosen folder. this continues on until all the files in the said folder have been parsed.
i tried the example located at the Resource Center of Revolution. it works but it uses repeat loops and repeat loops are often times uninterruptable by, e.g.: clicking a cancel button to stop the scanning. so i thought doing it via dispatch or send command would be better but Lord knows i've tried my best to attempt converting the sample found in the Resource Center about recursion in Files and Folders and still haven't been able to make it work. i seem to get overwhelmed by so much functions and commands!


BTW: i absolutely adore the new and improved board, phpBB3 am i right? and also the "File Attachment" feature is absolutely great!
