Originally Posted by itimpi
Another way of looking at this might be to move all the files that Calibre does NOT know about to another location initially. This could be the first step in deciding what to do about automating adding them back. A side effect is that it would handle the case where a user has mixed up Calibre folders and none-Calibre ones as all the none-Calibre ones would then be moved out.
Agreed - this would be the preferable way to separate the good library from other mixed-in miscellaneous junk, but it does require writing new code. I was just pointing out, however, that there's already code in place that does the reverse and can be used to separate good from bad. At least my tests seem to show that the current "move library" code moves only the books and folders it knows about, leaving the junk it doesn't know about in place.
Unless I've missed something, moving a library, followed by checking SQL integrity should leave a pretty clean library.