I am using a Google Apps Script to list Word files in a folder, however this will work only for .docx files, not .doc.
Any idea?
var folderID = "ID#"
var sourceFolder = DriveApp.getFolderById(folderID);
var files = sourceFolder.getFilesByType(MimeType.MICROSOFT_WORD);
// will list only .docx
Best Answer
How about this answer?
Pattern 1:
If you want to retrieve files with the extension of
.doc
, please modify as follows.From:
To:
Pattern 2:
If you want to retrieve files with the extensions of
.doc
and.docx
, please modify as follows.From:
To:
References:
If I misunderstood your question and this was not the result you want, I apologize.