Filter by entry has field set

I have two fields where I would like to match against especially: the first is the files field and the second the timestamp.
So for example: is it possible to filter for all entries where a file exists and the timestamp field is set?
I tried something like timestamp != "" and file != "" but this does not work