Step 1. Create a random spreadsheet from your google account.
Step 2. Click on spreadsheet Tools >> Script editor (There will be open a new tab with javascript editor)
Step 3. Clear the editor and Copy Pest the below code and press on save button like below image .
function ListExportFunction() {var folderName = 'SEAMAP_GA_Longline'; // Google Drive Just Folder Name
var folderlisting = 'listing of folder ' + folderName;
var folders = DriveApp.getFoldersByName(folderName)
var folder = folders.next();
var contents = folder.getFiles();
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]);
} };
That's All. Now Check Your Drive Home Page With Your Folder Name Including "listing of folder" File Name.
No comments:
Post a Comment