>> ... LIKE 'ba_foo\_png' but this does not seem to work. The escape mechanism for LIKE has never been implemented in SQLite. The work-around is to use GLOB if your pattern contains '_' or '%' (unfortunately, GLOB is not std SQL).
In case you're curious, the std SQL syntax is like 'ba_foo\_png' escape '\' Without the (unimplemented) escape clause, the '\' is just an ordinary character. Regards