georgeocrawford
Technical User
Hello,
I going round in loops here!
How can I write a script to find *all* the files within a directory, i.e. all the files contained in all the subdirectories of a specified directory?
I've tried looking at other scripts, creating multidimensional arrays, etc but I find myself in impossible loop situations!
I want to look for all the text files in a directory and it's subdirectories, and store their paths relative to the main directory in an array, like this:
0 => /folder1/folder6/text_file1.txt
1 => /folder4/folder1/text_file2.txt
2 => ...
and so on.
Thanks for any help
______________________
George
I going round in loops here!
How can I write a script to find *all* the files within a directory, i.e. all the files contained in all the subdirectories of a specified directory?
I've tried looking at other scripts, creating multidimensional arrays, etc but I find myself in impossible loop situations!
I want to look for all the text files in a directory and it's subdirectories, and store their paths relative to the main directory in an array, like this:
0 => /folder1/folder6/text_file1.txt
1 => /folder4/folder1/text_file2.txt
2 => ...
and so on.
Thanks for any help
______________________
George