I'm trying to look for the files that are spreadsheets (via mimeType) with the name "Speed", using nameContains or fullTextContains.
If only I put fullTextContains or name contains or any other method it works, but if I combine it with the method mimeType, I get all spreadsheet files and not just the specific matches.
My current script:
function SearchFiles() {
var searchFor = { 'name contains': "Vel", 'mimeType': "spreadsheet" };
var names = [];
var fileIds = [];
var files = DriveApp.searchFiles(searchFor);
while (files.hasNext()) {
var file = files.next();
var fileId = file.getId();
fileIds.push(fileId);
var name = file.getName();
names.push(name);
...