Monday, March 4, 2019

filesystems - How can I export file and folder tree structure of an external hard drive as a text file?



I have a malfunctioning hard drive that is full of thousands of files. All the files are still shown as 'there' when explored (with both Windows and Linux). Some of the files can be recovered by moving them to another hard drive, files with CRC errors cannot be moved.



Everything that can be recovered has been moved; the files that could not be moved have been left on the hard drive. I would like to create a 'text file' that lists all the files on the broken hard drive so that I have a list of files for future reference.



Are there any applications that allow me to do this?


Answer




As per Jimmy's suggestion, Windows dir command actually allows for a prettier output, this one gave me the best result:



dir *.mp3 /s /w /b > lostFiles.txt


Of course, removing *.mp3 from there gives all files, but in that case I only needed music.



Reference to dir command is here: http://www.computerhope.com/dirhlp.htm


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...