How to know a given file is a valid bitcoin wallet?
On Linux, you can use the file command. If the file is a Bitcoin wallet, you should see

wallet.dat: Berkeley DB (Btree, version 9, native byte-order)


(It will always say Berkley DB version 9, but the filename might be different.)

file is also availible on Windows: http://gnuwin32.sourceforge.net/packages/file.htm

How does file tell that it's a Berkley DB file? See How did file identify this wallet file?