Generate full files and folders report for server shares

article #1295, updated 1792 days ago

Many ways are slow, tend to crash on large collections of files, and/or do not produce HTML output which is reasonably small and readable. This command:

“ http://gnuwin32.sourceforge.net/packages/tree.htm”: http://gnuwin32.sourceforge.net/packages/tree.htm

ported from Linux to Windows, does quite well. Obviously the Linux native version is excellent. Apple-isms are not known to this writer. On Windows, install the above, and then run something like this:

tree --nolinks -T "SERVER_NAME: Name of the Share" -H "C:/Folder Name" "C:/Folder Name" > "C:\ReportLocation\SERVER_NAME - Name of the Share.html"

You’ll notice one oddity, “C:\Folder Name” included twice; this is a quirk, the -H doesn’t do anything because we’re using —nolinks, but if you want you can use this without —nolinks to build a clickabe page.

Permissions can be a problem. The running user has to be able to see all files. Running the command in administrative CMD may not be sufficient. If you have RMM, its command-line capability may well have enough.

Categories: