in reply to mark unreadable file so a loop does not read the file again
There are many solutions. On Windows you could tag each bad file with an Additional Data Stream, that's just the main filename with :something tagged on the end.
Simpler, and more portable, have a directory (called badfiles?), which is otherwise empty, and just create an empty file within it named the same as the bad file. The test to see if the bad file is there is a simple -e.
To avoid using a binary file use the -B test, that is not 100% accurate but works most of the time. If the file is genuinely corrupt then you might want to chmod 000 so no one can use it.