"dir /b *.azw" or *.mobi
Should work. But maybe it depends on where you are running command from?
You should change to your kindle "drive" and then to the document folder.
So if you get the command prompt
You'd want to change to the kindle - mine is Drive I:
I: (enter key)
at the command prompt.
cd documents (enter key)
dir /s *.azw > holdbooks.txt (enter key)
where the > redirects the output into the file holdbooks.txt
/s means go down the folders if you have subfolders like Mystery under documents.
(hopefully, I got most of it right but it still should not reboot the computer)