you can use a command like this:
robocopy f:\ C:\temp /E /L /NDL /FP /NC /TS /xjd > c:\temp\robocopy-list-drive-f.txt
This doesn’t copy any files, just creates a file with the list of all files.
The /xjd is important to avoid multiple nested folder links from repeating.