How postgresql full text search disable file parser?
You would have to make your own parser.  This is not easy to do.  You would also have to decide what features of the parser to keep and what to throw away.  It isn't clear to me that the file token type is the only one that will give you problems.  There is a test module 'test_parser' which could serve as an example of creating your own, but it much too simple, while the default one is much too complex.
create extension test_parser ;
CREATE TEXT SEARCH CONFIGURATION testcfg ( PARSER = testparser );

A more pragmatic solution might be to just push the text through replace(col_name,'.',' ') before passing it to to_tsvector.  If you were using plainto_tsquery, etc., you would also want to pass the query through that, but since you are just using to_tsquery, you would not need to do that.