Jonbojangles
02-14-2006, 05:29 PM
I am able to return all the directories, but none of the files inside of those directories.
Any help is much appreciated. Thank you
button file_button "Testing" width:180
on file_button pressed do
(
global FindFiles
fn FindFiles dir fileMask =
(
_max_src = ("Z:\character")
--output= ("Z:\image-dump")
global dir = _max_src
-- dir has the rootDir to operate on
-- fileMask has the file wildcard pattern
local rootDir = dir
rootDir = TrimRight rootDir
rootDir = TrimRight rootDir "\\/" -- Remove any trailing slash
-------------------------------------------------
dirArray = GetDirectories (rootDir + "\\*")
for d in dirArray do
(
join dirArray (GetDirectories (d + "*"))
)
--------------------------------------------------
files = getFiles (rootDir + \\*.max (file://\*.max))
for f in files do
(
join files (getFiles (f + "*.max"))
)
--------------------------------------------------
--------------------------------------------------
)
--print(FindFiles)
--print(dirArray)
--print(files)
)
Any help is much appreciated. Thank you
button file_button "Testing" width:180
on file_button pressed do
(
global FindFiles
fn FindFiles dir fileMask =
(
_max_src = ("Z:\character")
--output= ("Z:\image-dump")
global dir = _max_src
-- dir has the rootDir to operate on
-- fileMask has the file wildcard pattern
local rootDir = dir
rootDir = TrimRight rootDir
rootDir = TrimRight rootDir "\\/" -- Remove any trailing slash
-------------------------------------------------
dirArray = GetDirectories (rootDir + "\\*")
for d in dirArray do
(
join dirArray (GetDirectories (d + "*"))
)
--------------------------------------------------
files = getFiles (rootDir + \\*.max (file://\*.max))
for f in files do
(
join files (getFiles (f + "*.max"))
)
--------------------------------------------------
--------------------------------------------------
)
--print(FindFiles)
--print(dirArray)
--print(files)
)
