HOW TO GET LIST OF FILES IN GOOGLE DRIVE [SOLVED] 100% Working

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 234

  • @polkmnn098
    @polkmnn098 Год назад +8

    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.

  • @jennylynneh
    @jennylynneh 2 года назад

    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!

  • @erekit
    @erekit 2 года назад

    it works, to show support, i have subscribed and liked

  • @franciscarloesteban5247
    @franciscarloesteban5247 2 года назад

    Thanks. It works. New subscriber here!

  • @elusiveheir
    @elusiveheir 6 месяцев назад

    This still work. Thank you!

  • @aminedj430
    @aminedj430 3 года назад

    thanks bro you save me a lot of time on my project to get files link

  • @anandavardhana9560
    @anandavardhana9560 3 года назад

    Wow!! Thank you Vikas that was of immense help!! bahuth shukria!

  • @brisklearningsolutions450
    @brisklearningsolutions450 3 года назад

    This was really really helpful. Otherwise I was thinking to individually copy paste each name. You saved my 2 hours time. Much appreciated.

  • @b199uybas3
    @b199uybas3 4 года назад +3

    Just to replace the folder name but not working, any suggest? Thank you

  • @TDoC2024
    @TDoC2024 3 года назад +1

    This worked great! Thank you. I had 179 file names to move and this was perfect.

  • @TonyFranks
    @TonyFranks 4 года назад +8

    This is really useful, thanks!
    Is there a way to make it recurse subdirectories?

  • @hellogunj
    @hellogunj 3 года назад

    Thank you Very much. You saved me entire days work today... ❤️

  • @hikarujamiemasamiya
    @hikarujamiemasamiya 3 года назад

    Thank you very much!!
    I loved this video

  • @maheshbabu-xy9nd
    @maheshbabu-xy9nd 4 года назад

    Excellent Sir, Awesome thing .. Saved hours of time for me .. Thank You So Much For The Code.

  • @gurubasugurupadagol9300
    @gurubasugurupadagol9300 3 года назад

    This works Great
    Thank bro

  • @valdjrabc
    @valdjrabc 5 лет назад +2

    Thank you very much
    An excellent routine
    Extremely useful for handling large amount of files on google drive.
    Valdir Santos Jr from Brazil

  • @heartfulnessgujarat9375
    @heartfulnessgujarat9375 3 года назад

    Yes. It worked. Very useful.

  • @tailieudieuky3774
    @tailieudieuky3774 2 года назад

    Your video is incredibly helpful. Thanks a lot and hope to get more like this.

  • @DrGovindakbari
    @DrGovindakbari 6 лет назад +4

    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 ?

    • @unitychannel2627
      @unitychannel2627 5 лет назад +1

      I want to know how to get the name of the child folders too.

    • @mannyese
      @mannyese 4 года назад

      I have a video about this

    • @ivanb1982
      @ivanb1982 4 года назад +1

      @@mannyese yes, and your script costs 19 dollars to download it.. Keep it for you. thanks anyway.

  • @TahaLahlou
    @TahaLahlou 4 года назад

    works perfect! thx. you've got a new subscriber.

  • @eleventuresystemsservicesp5210
    @eleventuresystemsservicesp5210 3 года назад

    Good job.. thank you Vikas.. god bless

  • @FilipeBarcellos
    @FilipeBarcellos 4 года назад

    Definitely solved. Don't know if best solution, but it works pretty well. Thanks

  • @indrockz
    @indrockz 4 года назад

    thaaankkkk you verrryy muchh.. this is very helpfull...

  • @lizzybalmain4234
    @lizzybalmain4234 2 года назад

    A great help! Thanks so much :)

  • @Corporatevideoproduction
    @Corporatevideoproduction 2 года назад

    Great tip. Thanks a lot

  • @MonicoCandelaria-zu8gc
    @MonicoCandelaria-zu8gc Год назад

    so cool. thank you.

  • @anz-t1f
    @anz-t1f 4 года назад

    Thanks for making this video. Was a big help.

  • @shukvyshuk
    @shukvyshuk 4 месяца назад

    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?

  • @bluemontrat6085
    @bluemontrat6085 5 лет назад +5

    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]);
    }

    };

  • @alomaryah
    @alomaryah 3 года назад

    Amazing, loved it. You are the best!

  • @shalh
    @shalh 4 года назад

    What a helpfull code it is. Thanks for sharing ...

  • @Dana-et1ub
    @Dana-et1ub 5 лет назад

    Works perfectly. I expect it to save me a HUGE amount of time. Thank you!!!

    • @b199uybas3
      @b199uybas3 4 года назад

      Hi, i already replace the folder nama but not working, can you help me?

  • @zenihama
    @zenihama 2 года назад

    Fantastic - thank you so much 😄

  • @saralestore2473
    @saralestore2473 4 года назад

    Thankyou so much, this is really help full

  • @flopollock3666
    @flopollock3666 4 года назад

    This is really useful- Thank you!

  • @VideoGames-wi8vf
    @VideoGames-wi8vf 3 года назад

    you are amazing !!! thank you sir

  • @darrynalexander2651
    @darrynalexander2651 4 года назад

    Very useful utility - thanks so much!!!

  • @hollyjolly1191
    @hollyjolly1191 2 года назад

    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?

    • @mehtavikas99
      @mehtavikas99 2 года назад

      Yes there are some ways to do that too

  • @ycmouofficialyoutubechanne5755
    @ycmouofficialyoutubechanne5755 4 года назад

    It is very very helpful.. Thank you...

  • @anjalikalaskar1342
    @anjalikalaskar1342 3 года назад

    This is easy to use and saves a lot of time. Thank you!

  • @tritonrestorations
    @tritonrestorations 2 года назад

    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.

  • @Nacho-WhatDoWePlayNext
    @Nacho-WhatDoWePlayNext 3 года назад

    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?

  • @dennisdaniels7857
    @dennisdaniels7857 4 года назад

    Very useful! Thanks for making computing easier!

  • @kallkyl
    @kallkyl 3 года назад

    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.

  • @MrVite
    @MrVite 3 года назад

    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 ?

  • @beingcoded2392
    @beingcoded2392 5 лет назад

    Awesome video.... you are a champ!

  • @oneztwolls
    @oneztwolls 3 года назад

    This is fantastic! Thank you for sharing this.

  • @joelprestonsmith
    @joelprestonsmith 5 лет назад +3

    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")"

    • @SandorLau
      @SandorLau 5 лет назад

      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.

    • @RomboutVersluijs
      @RomboutVersluijs 4 года назад

      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?

  • @jechristensen12
    @jechristensen12 4 года назад

    Thanks, great time saver...

  • @lorielambert6283
    @lorielambert6283 3 года назад

    THANK YOU SO MUCH!!!! SO USEFUL!!!!

  • @suwitplay7281
    @suwitplay7281 2 года назад

    Excuse, please help. I need to khow.
    How to list file from "Share with me" folder?

  • @girri
    @girri 3 года назад

    Thanks for this. Awesome Work! Maybe you should compile a list of common script snippets people might need.

  • @winecountrygames1859
    @winecountrygames1859 5 лет назад +2

    Ok how do you update the list if changes have been made without having to remake the list?

  • @denembalzado8991
    @denembalzado8991 2 года назад

    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!

  • @russstewart1398
    @russstewart1398 4 года назад

    OUTSTANDING!!! Thank you so MUCH!

  • @myskillacademy4329
    @myskillacademy4329 4 года назад

    It works ... Thanks

  • @sparrtak
    @sparrtak 4 года назад +1

    thank you super helpful! The file appeared in my root folder.

  • @icnaedmonton5140
    @icnaedmonton5140 3 года назад +1

    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?

  • @ChewieHuey
    @ChewieHuey 4 года назад +2

    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.

    • @newborn7850
      @newborn7850 4 года назад

      i have 200 files each in 10 folders , will it work for me

  • @sarinduwijethilake6505
    @sarinduwijethilake6505 3 года назад +1

    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")

    • @Ludvio
      @Ludvio 3 года назад

      change the folder name is script to folder name in your google drove

  • @angemuller1457
    @angemuller1457 5 лет назад

    Thank you so much... I am thrilled to get this

  • @user-uk6mp3vo3r
    @user-uk6mp3vo3r 3 года назад

    Hi it's amazing it's working....is there a way that we can add size of those files....Thank you very much

  • @aliciamorehouse217
    @aliciamorehouse217 2 года назад

    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?

  • @jomalovera1131
    @jomalovera1131 4 года назад

    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?

  • @test-all2-pp361
    @test-all2-pp361 3 года назад

    useful, liked

  • @sunilbailwal4994
    @sunilbailwal4994 3 года назад

    Thanks although the script was not useful for me but I got the idea to get all the files name of root folder.

  • @RomboutVersluijs
    @RomboutVersluijs 4 года назад

    Would be nice if you showed a follow up for child folders and files. Using getFolders doesnt seem to iterate over folder names???

  • @akpalmerAA
    @akpalmerAA Год назад

    Is there a way to do this so you get the folders and files listed within a shared drive or even your own drive?

  • @rickeywillemse
    @rickeywillemse 3 года назад

    Please help: When I use the code I get the following message: Script function not found: doGet. Would should I add to the code?

  • @shanaudio
    @shanaudio 4 года назад +2

    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

  • @aganokiravu5849
    @aganokiravu5849 4 года назад

    Fantastic! Thanks for sharing

  • @teresalondon102
    @teresalondon102 4 года назад

    Thanks so much for this! Do you happen to have the variables for Date and owners or other variables that are avaialble?

    • @LauraMaestuVazquez
      @LauraMaestuVazquez 4 года назад +1

      sheet.appendRow(['name','link', 'date']);
      (...)
      var date
      date = file.getDateCreated();
      sheet.appendRow([name, link, date]);

  • @mensajesmasivos6142
    @mensajesmasivos6142 2 года назад

    Hello, I got this error: Exception: Cannot retrieve the next object: iterator has reached the end. Any idea how to solve it?

  • @Ludvio
    @Ludvio 3 года назад

    you are the man, the code runs but no sheet is created...can you help?

  • @kapildhingraspirit
    @kapildhingraspirit 4 года назад

    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

  • @StevenAlves1
    @StevenAlves1 3 года назад

    Thank you so much!

  • @JeffSelk
    @JeffSelk 4 года назад +2

    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.

  • @b199uybas3
    @b199uybas3 4 года назад +1

    Hi, is this will dynamic? I mean if add a new image will be automatically add into list?

    • @fgmxbiconsulting8424
      @fgmxbiconsulting8424 4 года назад

      You can add a Trigger, i can help u if u want.

    • @AmorFatiYT
      @AmorFatiYT 3 года назад

      @@fgmxbiconsulting8424 hi man what is the solution? thanks

  • @davidyates3688
    @davidyates3688 4 года назад

    EXCELLENT contribution. Thank you, most useful.
    What if the files you are interested in are in a ZIP file?

  • @GTAHomeGuy
    @GTAHomeGuy 4 года назад

    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?

  • @ophiratar5957
    @ophiratar5957 3 года назад

    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?

  • @fam1pk
    @fam1pk 5 лет назад +1

    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

    • @rappcu
      @rappcu 4 года назад +1

      I got it to work with a root level folder, but not subfolders. I'd like this answered too please.

  • @3designlibrary
    @3designlibrary 4 года назад

    your are super hero thank you but one question... how can i add thumbnails of pdf files to the list

  • @annabiegaj-brzyska3278
    @annabiegaj-brzyska3278 4 года назад

    I just replace a folder name, but not working, do you know why?

  • @manojeshwar8960
    @manojeshwar8960 3 года назад

    What to do if i dont want from a specific folder and I need from the entire drive.

  • @Zgriffinable
    @Zgriffinable 3 года назад

    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.

  • @PeteSch1508
    @PeteSch1508 3 года назад

    does this not work in google sheets or microsoft xl? please clarify

  • @mauroforte9629
    @mauroforte9629 5 лет назад +2

    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...

    • @mehtavikas99
      @mehtavikas99 5 лет назад

      You will have to regenerate

    • @mauroforte9629
      @mauroforte9629 5 лет назад

      @@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?

    • @mehtavikas99
      @mehtavikas99 5 лет назад

      @@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...

    • @mauroforte9629
      @mauroforte9629 5 лет назад

      @@mehtavikas99 it will be really appreciate

    • @mannyese
      @mannyese 4 года назад

      I have a video about this

  • @bajpairavi
    @bajpairavi 4 года назад

    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?

  • @richardprice2829
    @richardprice2829 3 года назад

    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.

  • @Youth_Ideathon2024
    @Youth_Ideathon2024 4 года назад

    I am not able to create the file like you did in two minutes. Please help

  • @ladypontanos3701
    @ladypontanos3701 3 года назад

    is it working even the folder is placed on shared drives?

  • @pedro237
    @pedro237 3 года назад

    Hi I've just tried this -
    I don't get the place where you copy the script.
    And advice anyone?

  • @biswajitray5850
    @biswajitray5850 4 года назад

    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

  • @longobaby
    @longobaby 3 года назад

    I am getting a syntax error on line 24
    can you advise

  • @ahmedaly7906
    @ahmedaly7906 3 года назад

    Is there any way to be updated for any new files add to the folder

  • @jevish
    @jevish 5 лет назад

    Hi... thanks.
    Is it possible to get the size column ? and I am unable to see folders/files shared by others in the list.

    • @mehtavikas99
      @mehtavikas99 5 лет назад

      Yes... Just google you will get the.... A dd it at the end....N pls subscribe

    • @mannyese
      @mannyese 4 года назад

      I have a video about this

    • @ivanb1982
      @ivanb1982 4 года назад

      @@mannyese yes, and your script costs 19 dollars to download it.. Keep it for you. thanks anyway.

  • @terryw3188
    @terryw3188 5 лет назад +1

    Hi, How can I export the hyperlink name same as the files name?

  • @dema-3000
    @dema-3000 3 года назад

    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?

    • @mehtavikas99
      @mehtavikas99 3 года назад

      seems you missed some point ...just close all and try again with the root folder

    • @mehtavikas99
      @mehtavikas99 3 года назад

      also subscribe

  • @erincoyneinteriordesign627
    @erincoyneinteriordesign627 3 года назад

    Is there a way for it to pull names from multiple different folders? I'd be willing to pay for your help, thanks.