Как выгрузить ссылки на файлы в папке GoogleDrive

2019-12-11

https://www.youtube.com/watch?v=Uwib2Kf9bBo

https://www.acrosswalls.org/ortext-datalinks/list-google-drive-folder-file-names-urls/

// replace your-folder below with the folder for which you want a listing
function listFolderContents() {
  var foldername = 'your-folder';
  var folderlisting = 'listing of folder ' + foldername;
  
  var folders = DriveApp.getFoldersByName(foldername)
  var folder = folders.next();
  var contents = folder.getFiles();
  
  var ss = SpreadsheetApp.create(folderlisting);
  var sheet = ss.getActiveSheet();
  sheet.appendRow( ['name', 'link'] );
  
  var file;
  var name;
  var link;
  var row;
  while(contents.hasNext()) {
    file = contents.next();
    name = file.getName();
    link = file.getUrl();
    sheet.appendRow( [name, link] );     
  }  
};
GoogleDriveGoogle Sheets

Как выгрузить ссылки из Google Sheets

Как спарсить People also ask в выдаче Google by Netpeak Spider

comments powered by Disqus