Ive been trying to figure a way of getting access to all files in a subdirectory, and then loop through. Ive found examples where it will just dump out the files per line, however what I want is to go through each file and get at:-
- FileName
- Directory
- FileSize
- Created
- LastModified
The idea is then to export them into a database table and then do some queries on them.
Any easy suggestions on how to do a foreach loop for each file in a directory (recursive to include sub-directories).
Im assuming to do this as a function and then call the function for each sub-directory, but struggeling to get the array of files.