This script is out of date. Those properties were deprecated a while back. Labels is no longer in use.
Try this:
function getFiles() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getSheets()[0];
var files = Drive.Files.list();
var listItem = files.items.map(function(file) {
return [file.title, file.modifiedDate, file.ownerNames, file.createdDate];
});
sheet.getRange(1,1,listItem.length,listItem[0].length).setValues(listItem);
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/4334364e-089a-4edd-aaad-1e5f15f3855en%40googlegroups.com.
The script is expected to be inside a spreadsheet for it to work. It is not a standalone script.
Try adding it to a spreadsheet and then run it.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/47c898f4-01c3-4486-8177-ae8107b0adean%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/31676201-fecc-49ef-829c-49619a539e83n%40googlegroups.com.
Then the script should work for you.
The only reason you would get this error:
TypeError: Drive.Files.list(...).filter is not a function
Is if you do not have access to the folder in question.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/e8ce9c8c-afc2-454a-9cc8-fd5e8d671c0dn%40googlegroups.com.