Hi everyone,
I have an external hard drive for backup and storing files that are not used on a daily basis. The problem is that these files are often forgotten, and it is inconvenient to connect the drive just to browse through them.
Is there a way to automatically generate a directory tree listing of all the files on the external hard drive?
Thanks
Directory Tree for External Hard Drive
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 1
- Joined: Thu Jul 24, 2025 8:18 am
Re: Directory Tree for External Hard Drive
Hi, welcome to the forum.
A bit out of my lane, files and folders, but have you checked out both the "Files" and "Folders" functions in the dictionary? Pay attention to the "long" versions of each.
Craig
A bit out of my lane, files and folders, but have you checked out both the "Files" and "Folders" functions in the dictionary? Pay attention to the "long" versions of each.
Craig
Re: Directory Tree for External Hard Drive
Hi Joseph,
welcome to the forum!
Check this page, that may be what you are looking for!
https://www.sonsothunder.com/devres/liv ... ile007.htm
Best
Klaus
welcome to the forum!
Check this page, that may be what you are looking for!
https://www.sonsothunder.com/devres/liv ... ile007.htm
Best
Klaus
Re: Directory Tree for External Hard Drive
Unnecessarily complex.
This is the handler I use to get the file paths of all files in a folder (can be a volume), that drills down recursively through all nested folders and can include a search pattern (eg extension/filetype):
Code: Select all
function recursiveFilesWithPattern pFolder, pPattern
Local tPaths
filter files(pFolder) with "*" & pPattern & "*"
repeat for each line tFile in it
put pFolder & slash & tFile & cr after tPaths
end repeat
filter folders(pFolder) without ".."
repeat for each line tFolder in it
put recursiveFilesWithPattern(pFolder & slash & tFolder, pPattern) after tPaths
end repeat
return tPaths
end recursiveFilesWithPattern