Excellent! Thanks so much. Notes on Dec 1, 2022: The script editor is now called Apps Script and is found under Extensions (not Tools). Caution: When you copy and paste the script he gives, make sure any and all other code / markings are deleted/ completely replaced when you paste (see 01:30 in the video). And delete the semicolon just above his note " ****PLEASE..." . After executing the file will be created in the root folder of MyDrive.
Thank you! This is going to help me create my Required Reading List in Roam for the class files I uploaded to Google! You have saved me a lot of pain and suffering!
What should be done if one folder contains multiple child folders, and we want list of all files from all folders ?? Which line of code should be edited ?
hmm for some reason i've been having problems with this one, specifically at the giving permission part. Can be because i'm using a corporate account, tied to a different domain?
For those that think it has not worked, check your Google Drive, not in the folder where you saved. So no parent folders, just in GDrive itself and it should be there. Also, the code in the description will run and work; however, it has an unnecessary redundancy and does not rename the function (it just calls it 'myFunction()') which could cause problems if you work with other scripts in GDrive and another function uses the default function name for some reason. See the edited code below. //One only need change the "foldername" to the name of the folder ('Wave 5' here) and it works. //It will deposit the video with no parent directory so it will just be in GDrive function listFolderContents() { var foldername = 'Wave 5'; 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]); }
Instead of searching by folder name, can I use a cell to reference the folder's ID? For example, if I have the url to the drive folder in A1, and I want to get the first image's URL from this folder in B1, would that be possible? Or the latest image, or whatever. I just need one image URL from a drive link.
thank you very much! you were a life saver, now quick question is it possible to extract also the file path to get the location ? and what happens when the folders contain subfolders? can this be extracted too ?
When I run the script, I get the following error (after I've given all permissions): "Cannot retrieve the next object: iterator has reached the end. (line 6, file "Code")"
I have the same problem. Vikas, I subscribed. This is really great work, but I don't know how to write code and I think many, many people could use this.
My guess you have entered wrong folder name where it needs to look. Did you change line 2 to a foldername inside your own Google Drive or Shared FOlder?
Hello Thank you for this. I just want to know if there is a way wherein you will not create another sheet because I already have one. And on that sheet I have a column wherein the text strings there is what I want to replace the filename of the video files. Hope you can help me. thank you!
Thanks Vikas for a wonderful time saving tutorial. I tried it on a folder shared with me. It ran smoothly but I didn't find the listing file anywhere? Any idea, where I can find it?
I think this only works for folders without subfolders? The code cannot capture the URL of the files if they are stored within subfolders? Is there another code that can capture the URL of those stored within subfolders?
HI< when I go to google excel sheet and tools>>script editor, it gives the error below: Sorry, unable to open the file at present. Please check the address and try again. Get stuff done with Google Drive Apps in Google Drive make it easy to create, store and share online documents, spreadsheets, presentations and more. Learn more at drive.google.com/start/apps. I tried different google accounts..... Please advice
This is great, thanks. I have multiple folders with the same name (as far as I can tell), such as in Classroom folders for multiple classes that have the same assignments. Can I pass a more complete folder name that is unambiguous? Thanks.
I wasn't able to get this to work, I cannot find any new file made (when I am checking both the Google sheets and Drive). Is there something simple I am doing wrong? Does it have a max capability of files?? As in if I have too many files will it not work?
Does not work for me on 3 June 2021. Also note that what he lists for you to copy does not match his video. His video includes // replace your ... I note no one has praised this video since 1 year ago so perhaps google changed something. Also when I past his test into my scrip, I get a red ? which I erased...still didn't work.
@@mauroforte9629 I mean that you will have to run the job again which will create a new file....The file won't get auto updated.....However if your requirement is that the same file should get updated with the new files in the given folder then that will require a more complex script.....I will create one when the subscriber level reaches 1000...
Hi, this is really helpful. Subscribing you! One question - what if I have multiple folders within a folder. Each of the multiple folders has files and I want those files in a spreadsheet?
I believe that the script has been damaged. Please look at it and fix if needed. running the current script gives an error message. And the script does not look right to me.
Thanks very nice video! However when I put the generated link in my VBA script (to open an Excel file) then doesn't work, but if I click on the link is ok ?!? Do you know how to get the folderpath of the desired files in GDrive?
Excellent! Thanks so much. Notes on Dec 1, 2022: The script editor is now called Apps Script and is found under Extensions (not Tools). Caution: When you copy and paste the script he gives, make sure any and all other code / markings are deleted/ completely replaced when you paste (see 01:30 in the video). And delete the semicolon just above his note " ****PLEASE..." . After executing the file will be created in the root folder of MyDrive.
Thank you! This is going to help me create my Required Reading List in Roam for the class files I uploaded to Google! You have saved me a lot of pain and suffering!
it works, to show support, i have subscribed and liked
Thanks. It works. New subscriber here!
This still work. Thank you!
thanks bro you save me a lot of time on my project to get files link
Wow!! Thank you Vikas that was of immense help!! bahuth shukria!
This was really really helpful. Otherwise I was thinking to individually copy paste each name. You saved my 2 hours time. Much appreciated.
Just to replace the folder name but not working, any suggest? Thank you
This worked great! Thank you. I had 179 file names to move and this was perfect.
This is really useful, thanks!
Is there a way to make it recurse subdirectories?
Thank you Very much. You saved me entire days work today... ❤️
Thank you very much!!
I loved this video
Excellent Sir, Awesome thing .. Saved hours of time for me .. Thank You So Much For The Code.
This works Great
Thank bro
Thank you very much
An excellent routine
Extremely useful for handling large amount of files on google drive.
Valdir Santos Jr from Brazil
Yes. It worked. Very useful.
Your video is incredibly helpful. Thanks a lot and hope to get more like this.
What should be done if one folder contains multiple child folders, and we want list of all files from all folders ?? Which line of code should be edited ?
I want to know how to get the name of the child folders too.
I have a video about this
@@mannyese yes, and your script costs 19 dollars to download it.. Keep it for you. thanks anyway.
works perfect! thx. you've got a new subscriber.
Good job.. thank you Vikas.. god bless
Definitely solved. Don't know if best solution, but it works pretty well. Thanks
thaaankkkk you verrryy muchh.. this is very helpfull...
A great help! Thanks so much :)
Great tip. Thanks a lot
so cool. thank you.
Thanks for making this video. Was a big help.
hmm for some reason i've been having problems with this one, specifically at the giving permission part. Can be because i'm using a corporate account, tied to a different domain?
For those that think it has not worked, check your Google Drive, not in the folder where you saved. So no parent folders, just in GDrive itself and it should be there. Also, the code in the description will run and work; however, it has an unnecessary redundancy and does not rename the function (it just calls it 'myFunction()') which could cause problems if you work with other scripts in GDrive and another function uses the default function name for some reason. See the edited code below.
//One only need change the "foldername" to the name of the folder ('Wave 5' here) and it works.
//It will deposit the video with no parent directory so it will just be in GDrive
function listFolderContents() {
var foldername = 'Wave 5';
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]);
}
};
Thank you!
Thank you this solved it for me!
Amazing, loved it. You are the best!
What a helpfull code it is. Thanks for sharing ...
Works perfectly. I expect it to save me a HUGE amount of time. Thank you!!!
Hi, i already replace the folder nama but not working, can you help me?
Fantastic - thank you so much 😄
Thankyou so much, this is really help full
This is really useful- Thank you!
you are amazing !!! thank you sir
Very useful utility - thanks so much!!!
pls subscribe
This is wonderful!! Thank you so much! I only have one question- is there a way to also list everyone who has access to each file?
Yes there are some ways to do that too
It is very very helpful.. Thank you...
This is easy to use and saves a lot of time. Thank you!
Instead of searching by folder name, can I use a cell to reference the folder's ID? For example, if I have the url to the drive folder in A1, and I want to get the first image's URL from this folder in B1, would that be possible? Or the latest image, or whatever. I just need one image URL from a drive link.
is there a way to also list the folders in a folder and have this listing crawl to show what is in all those sub-folder, and perhaps sub-sub-folders?
Very useful! Thanks for making computing easier!
Should the spreadsheet be located IN the folder we want a listing for, or on the level ABOVE the folder? It is unclear from the movie. Or ambiguous.
thank you very much! you were a life saver, now quick question is it possible to extract also the file path to get the location ? and what happens when the folders contain subfolders? can this be extracted too ?
Awesome video.... you are a champ!
This is fantastic! Thank you for sharing this.
Kindly subscribe
When I run the script, I get the following error (after I've given all permissions): "Cannot retrieve the next object: iterator has reached the end. (line 6, file "Code")"
I have the same problem. Vikas, I subscribed. This is really great work, but I don't know how to write code and I think many, many people could use this.
My guess you have entered wrong folder name where it needs to look. Did you change line 2 to a foldername inside your own Google Drive or Shared FOlder?
Thanks, great time saver...
THANK YOU SO MUCH!!!! SO USEFUL!!!!
Excuse, please help. I need to khow.
How to list file from "Share with me" folder?
Thanks for this. Awesome Work! Maybe you should compile a list of common script snippets people might need.
Ok how do you update the list if changes have been made without having to remake the list?
Hello Thank you for this. I just want to know if there is a way wherein you will not create another sheet because I already have one. And on that sheet I have a column wherein the text strings there is what I want to replace the filename of the video files. Hope you can help me. thank you!
OUTSTANDING!!! Thank you so MUCH!
pls subscribe
It works ... Thanks
thank you super helpful! The file appeared in my root folder.
pls subscribe
Thanks Vikas for a wonderful time saving tutorial. I tried it on a folder shared with me. It ran smoothly but I didn't find the listing file anywhere? Any idea, where I can find it?
same thing for me :(
Keep in mind that Google API has a 6 min limit, so if you have a lot of files, this will "exceed maximum execution time" and stop.
i have 200 files each in 10 folders , will it work for me
It did not work for me. Can you pls help?
Exception: Cannot retrieve the next object: iterator has reached the end. (line 6, file "Code")
change the folder name is script to folder name in your google drove
Thank you so much... I am thrilled to get this
Hi it's amazing it's working....is there a way that we can add size of those files....Thank you very much
When I create the new spreadsheet and go to Tools I don't see script editor. Any ideas on where to find script editor in the new spreadsheet?
I think this only works for folders without subfolders? The code cannot capture the URL of the files if they are stored within subfolders? Is there another code that can capture the URL of those stored within subfolders?
useful, liked
Thanks although the script was not useful for me but I got the idea to get all the files name of root folder.
Would be nice if you showed a follow up for child folders and files. Using getFolders doesnt seem to iterate over folder names???
Is there a way to do this so you get the folders and files listed within a shared drive or even your own drive?
Please help: When I use the code I get the following message: Script function not found: doGet. Would should I add to the code?
Hi, this is really help full . Can you export url & names for specific file type like all the Videos on the google drive ? pls help
Fantastic! Thanks for sharing
Thanks so much for this! Do you happen to have the variables for Date and owners or other variables that are avaialble?
sheet.appendRow(['name','link', 'date']);
(...)
var date
date = file.getDateCreated();
sheet.appendRow([name, link, date]);
Hello, I got this error: Exception: Cannot retrieve the next object: iterator has reached the end. Any idea how to solve it?
you are the man, the code runs but no sheet is created...can you help?
HI< when I go to google excel sheet and tools>>script editor, it gives the error below:
Sorry, unable to open the file at present.
Please check the address and try again.
Get stuff done with Google Drive
Apps in Google Drive make it easy to create, store and share online documents, spreadsheets, presentations and more.
Learn more at drive.google.com/start/apps.
I tried different google accounts..... Please advice
Thank you so much!
This is great, thanks. I have multiple folders with the same name (as far as I can tell), such as in Classroom folders for multiple classes that have the same assignments. Can I pass a more complete folder name that is unambiguous? Thanks.
i have the same query.
Hi, is this will dynamic? I mean if add a new image will be automatically add into list?
You can add a Trigger, i can help u if u want.
@@fgmxbiconsulting8424 hi man what is the solution? thanks
EXCELLENT contribution. Thank you, most useful.
What if the files you are interested in are in a ZIP file?
I wasn't able to get this to work, I cannot find any new file made (when I am checking both the Google sheets and Drive). Is there something simple I am doing wrong? Does it have a max capability of files?? As in if I have too many files will it not work?
Thanks. For some unknown reason, It doesn't let me open the script. I get an error saying: "Sorry, unable to open the file at this time". Any idea?
Dear Vikas Mehta Sir, How to do for sub folders or folder tree with in folder? Can we do it in 1 file all the links? your help is requested
I got it to work with a root level folder, but not subfolders. I'd like this answered too please.
your are super hero thank you but one question... how can i add thumbnails of pdf files to the list
I just replace a folder name, but not working, do you know why?
What to do if i dont want from a specific folder and I need from the entire drive.
Does not work for me on 3 June 2021. Also note that what he lists for you to copy does not match his video. His video includes // replace your ... I note no one has praised this video since 1 year ago so perhaps google changed something. Also when I past his test into my scrip, I get a red ? which I erased...still didn't work.
does this not work in google sheets or microsoft xl? please clarify
great, it works!! But if i put in the folder a new file (after generated the list of folder...) does the list updates? It seems NOT...
You will have to regenerate
@@mehtavikas99 thanks for the quick answer. What you mean re-generate? New script, new file? There is no way to regenerate from the same file?
@@mauroforte9629 I mean that you will have to run the job again which will create a new file....The file won't get auto updated.....However if your requirement is that the same file should get updated with the new files in the given folder then that will require a more complex script.....I will create one when the subscriber level reaches 1000...
@@mehtavikas99 it will be really appreciate
I have a video about this
Hi, this is really helpful. Subscribing you! One question - what if I have multiple folders within a folder. Each of the multiple folders has files and I want those files in a spreadsheet?
U can do it?
Guillermo Gómez yup
I believe that the script has been damaged. Please look at it and fix if needed.
running the current script gives an error message. And the script does not look right to me.
I am not able to create the file like you did in two minutes. Please help
is it working even the folder is placed on shared drives?
Hi I've just tried this -
I don't get the place where you copy the script.
And advice anyone?
How I send a file to someone's emial from a list file after matching file name or id which was taken from different client
I am getting a syntax error on line 24
can you advise
Is there any way to be updated for any new files add to the folder
Hi... thanks.
Is it possible to get the size column ? and I am unable to see folders/files shared by others in the list.
Yes... Just google you will get the.... A dd it at the end....N pls subscribe
I have a video about this
@@mannyese yes, and your script costs 19 dollars to download it.. Keep it for you. thanks anyway.
Hi, How can I export the hyperlink name same as the files name?
Thanks very nice video! However when I put the generated link in my VBA script (to open an Excel file) then doesn't work, but if I click on the link is ok ?!?
Do you know how to get the folderpath of the desired files in GDrive?
seems you missed some point ...just close all and try again with the root folder
also subscribe
Is there a way for it to pull names from multiple different folders? I'd be willing to pay for your help, thanks.
yup...100 dollars