tag:blogger.com,1999:blog-7379565521701914821.post8981329016024036836..comments2024-03-14T18:57:15.880+00:00Comments on The Gift of Script: Bulk create Google Drive folders 2.0Phil Bainbridgehttp://www.blogger.com/profile/10553620286575352544noreply@blogger.comBlogger53125tag:blogger.com,1999:blog-7379565521701914821.post-37855916980352059432023-06-22T11:14:36.205+01:002023-06-22T11:14:36.205+01:00Thank you Ifranco
So are you just looking for som...Thank you Ifranco<br /><br />So are you just looking for something that creates the folder on a Form submit (this will help: https://www.pbainbridge.co.uk/2020/05/create-google-doc-from-form-submission.html)? Or are you wanting to try and combine it with something else happening?<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-11173859282392808002023-06-21T20:28:48.193+01:002023-06-21T20:28:48.193+01:00This is a fantastic script. Thanks for your work o...This is a fantastic script. Thanks for your work on this! <br /><br />I'm looking for an idea on a slight tweak. I am currently importing names from a Google Sheet that generates new names based on Google Form submissions. I am using =importrange to sync data from that separate spreadsheet into a copy of the spreadsheet you made. <br /><br />I'd like each new form submission to automatically create a new folder. I have set up permissions via Google Drive for the master folder. I'm just looking to modify the script so it automatically generates a new folder when information comes into Column 1 and that it will stop creating new folders once it runs into an empty column A. lfrancohttps://www.blogger.com/profile/02511752011542960128noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-65251083395711424132023-02-03T02:31:46.604+00:002023-02-03T02:31:46.604+00:00Hi, Thanks for sharing. It's workHi, Thanks for sharing. It's workAzzam najibhttps://www.blogger.com/profile/17316022751263601599noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-71162142409580137752022-08-10T09:33:09.320+01:002022-08-10T09:33:09.320+01:00Hi Laurin
If you're happy you have filled in ...Hi Laurin<br /><br />If you're happy you have filled in the relevant cells like in the video, then I suggest you use the Contact Form on my blog to share a copy of your Google Sheet with me so that I can see what information you are entering, with a view to hopefully spotting the error.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-89760834888634869632022-08-09T23:26:58.658+01:002022-08-09T23:26:58.658+01:00Hi! I'm running this and receive the error &qu...Hi! I'm running this and receive the error "Exception: CAnnot convert " to int." When I click on details, it says the same thing, and when I go to Log it states<br /><br />"Script has started"<br />"Add Permissions option is: Yes"<br /><br />I've tried removing all emails from Column C on Data tab and updating Config to state no emails were provided, and I get the same error (but the 2nd item on log is "Add Permissions option is: No").<br /><br />Can you assist?Laurinhttps://www.blogger.com/profile/09653562544015307102noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-75412700462337451002022-06-18T19:48:55.992+01:002022-06-18T19:48:55.992+01:00Hi JC
This script is suited for 'My Drive'...Hi JC<br /><br />This script is suited for 'My Drive' as opposed to 'Shared Drive' - hence it's not quite a quick alteration I'm afraid, as the Drive API would need to be used and the process of adding permissions re-written. There is a bit of an example here: https://www.pbainbridge.co.uk/2021/06/set-permissions-on-shared-drive.html<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-58086217425394535882022-06-18T12:20:30.744+01:002022-06-18T12:20:30.744+01:00Is it possible to do the same thing but with conte...Is it possible to do the same thing but with content manager rights?<br /><br />ThanksJChttps://www.blogger.com/profile/04300687866463386288noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-80626694171806397732022-05-24T08:37:23.678+01:002022-05-24T08:37:23.678+01:00Hi
A few things to check:
1) Make sure you are on...Hi<br /><br />A few things to check:<br />1) Make sure you are only getting the Folder ID from the URL when you paste it into the Config Sheet - no other extra bits.<br />2) Make sure you are not logged into any other Google Accounts at the same time.<br /><br />If you still have a problem feel free to use the Contact Form to share a copy of your Google Sheet with me so that I can see what you are entering.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-13066357216445742922022-05-24T00:04:48.836+01:002022-05-24T00:04:48.836+01:00Phil,
This has the potential to save me a ton of ...Phil, <br />This has the potential to save me a ton of time, but I get this error every time:<br /><br />'createFolder' Function error<br />Unable to get Parent folder: Exception: No item with the given ID could be found. Possibly because you have not edited this item or you do not have permission to access it.<br /><br />I have tried several different folder IDs from my own Drive as well as a couple of our Shared Drives, but I always get the same error. I'm the tech admin at my school, so I have access to pretty much everything. Any insights you could offer would be much appreciated.T Lallyhttps://www.blogger.com/profile/17679777447094859338noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-6898758967363333142022-03-17T22:14:48.867+00:002022-03-17T22:14:48.867+00:00THANK YOU!!THANK YOU!!Anonymoushttps://www.blogger.com/profile/02260311607795991098noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-197207994808281972022-02-28T19:17:32.382+00:002022-02-28T19:17:32.382+00:00Hi
On what line? There is a 'Log' sheet t...Hi<br /><br />On what line? There is a 'Log' sheet to help show the errors - is that all it says in there?<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-82866223204328448912022-02-28T19:12:35.605+00:002022-02-28T19:12:35.605+00:00I'm getting "Exception: Cannot convert &q...I'm getting "Exception: Cannot convert " to int." in message details. Anonymoushttps://www.blogger.com/profile/13422244403253889654noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-87674281584211235642022-01-26T10:43:35.089+00:002022-01-26T10:43:35.089+00:00Hi Adrian
Thank you!
Are you referring to someth...Hi Adrian<br /><br />Thank you!<br /><br />Are you referring to something like this: https://www.pbainbridge.co.uk/2021/11/bulk-create-google-drive-folders-and.html<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-89935013786275618972022-01-26T01:06:41.142+00:002022-01-26T01:06:41.142+00:00Phil, this is so useful, thanks!
Could it be adap...Phil, this is so useful, thanks!<br /><br />Could it be adapted to create bulk copies of single files, say a pdf or google docs file, and give each their own unique file name, and then place them in a their own newly created sub-folder on Drive...?<br /><br />If it could that would be amazingly helpful for processing my admin tasks for my training projects.<br /><br />Thanks in advance!<br /><br />Kind regards<br /><br />AdrianAnonymoushttps://www.blogger.com/profile/02306717307465065434noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-17246730669193313302022-01-07T07:49:51.671+00:002022-01-07T07:49:51.671+00:00Thank you!
Firstly you may find this blog post mo...Thank you!<br /><br />Firstly you may find this blog post more applicable: https://www.pbainbridge.co.uk/2021/05/bulk-create-google-drive-folders-with.html<br /><br />It does however only create 1 extra sub-folder so you would need to modify it for more by updating the Apps Script code and potentially adding more columns in the Sheet.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-49881418735834525792022-01-06T15:14:45.696+00:002022-01-06T15:14:45.696+00:00Hey Phil,
First of all I love this script, I real...Hey Phil,<br /><br />First of all I love this script, I really appreciate you sharing this with all of us!<br />I was wondering, if I am making the same folder but with the same sub-folders, it's about 5 subfolders each time.<br />How can I add this?darjnessdamehttps://www.blogger.com/profile/03131745779199565163noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-38133631813402247702021-12-31T22:20:19.467+00:002021-12-31T22:20:19.467+00:00thanks phil! appreciate the guidance. happy new ...thanks phil! appreciate the guidance. happy new year!Anonymoushttps://www.blogger.com/profile/00437781508605253598noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-39647514206785201232021-12-31T14:09:01.441+00:002021-12-31T14:09:01.441+00:00Hi Brian
Thank you very much!
So with Apps Scrip...Hi Brian<br /><br />Thank you very much!<br /><br />So with Apps Script everything has to be in a specific place - each row, column, the Config sheet, etc all line up with what the code expects to find when it runs.<br /><br />You would need to go through line-by-line and match up/change what I have setup here with how your Sheet looks, in order to mould it around what you have.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-38291056471071997312021-12-30T20:00:40.424+00:002021-12-30T20:00:40.424+00:00hi phil,
this is tremendous. exactly what i need...hi phil,<br /><br />this is tremendous. exactly what i need. how can i add this functionality to an existing sheet? that is, i have a sheet that i use each week for a large mail merge, and i'd like to incorporate this functionality into it, so that i don't have to import my data into the "bulk create..." sheet to make my folders, and then again into my mail merge sheet. i tried copying and pasting everything into the script editor on my other sheet, but a test run returned an error: "TypeError: Cannot read property 'getDataRange' of null", so obviously i've missed something. is this an easy fix?<br /><br />thank you!<br />brianAnonymoushttps://www.blogger.com/profile/00437781508605253598noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-40762177290237081022021-11-22T09:11:42.559+00:002021-11-22T09:11:42.559+00:00Hi Megan
It sounds like you may have something in...Hi Megan<br /><br />It sounds like you may have something in your script that is picking up the 'existing' folder (probably to create your 'new' folder) and that variable is making its way into the rest of your code to create all of the other folders.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-43013733540403285822021-11-22T02:56:55.445+00:002021-11-22T02:56:55.445+00:00Hi! I was running a script in google script wherei...Hi! I was running a script in google script wherein it auto creates subfolders inside a masterfolder and I ran into a roadblock. Whenever the script has completed, there are also subfolders created inside a different master folder. This only happens in 1 exact master folder. For example, I created folder "New" and ran a script so subfolders would auto populate inside the "New" folder. Once it has completed, new subfolders are also auto populated inside "Existing" folder. Can you help me with this, please? Meganhttps://www.blogger.com/profile/01141297808156435797noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-30646027988951070312021-10-27T09:13:55.446+01:002021-10-27T09:13:55.446+01:00Hi Zen
Yes, as linked above it is possible with t...Hi Zen<br /><br />Yes, as linked above it is possible with the Drive API and whilst I have an example of how to use this, I don't have a version here with it built in I'm afraid.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-38064100233548588822021-10-26T21:00:37.480+01:002021-10-26T21:00:37.480+01:00Hi Phil, your script works great. However, I am ha...Hi Phil, your script works great. However, I am having the same requirement of not intimating the users when they are given the writer access. Is there is an easy way to make some change in your script to make it work? Many thanks,<br />Zen.Zenhttps://www.blogger.com/profile/03341250229541572225noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-46912075623512341732021-10-19T19:47:10.678+01:002021-10-19T19:47:10.678+01:00Hi
Yes this is possible so you can just use the f...Hi<br /><br />Yes this is possible so you can just use the first Folder Name column in the Sheet:<br /><br />1) Make a copy of the file from the Blog and open it.<br />2) Go to 'Tools' and then 'Script editor'.<br />3) On the left ensure '2) createFolders.gs' is selected.<br />4) Go to line 40 in the main window and change "var folderName = folderNameP1 + ' - ' + folderNameP2;" to "var folderName = folderNameP1;"<br />5) Click the Save project icon near the top of the screen, then close the Script editor.<br /><br />Now you can use just the one column without the unwanted hyphen appearing in the name.<br /><br />Kind regards<br />PhilPhil Bainbridgehttps://www.blogger.com/profile/10553620286575352544noreply@blogger.comtag:blogger.com,1999:blog-7379565521701914821.post-55790541918520982282021-10-18T21:32:26.792+01:002021-10-18T21:32:26.792+01:00This is so helpful! is there a way to change the s...This is so helpful! is there a way to change the script so that each folder doesn't have a - after? My folders are just one word, but when I run the script with either just the first "Folder Name" column filled in, or deleting the second 'Folder Name" column, the folders are created corrected, just with a dash (-) after. Is there a way to fix this? If the folder is called "Test" it shows up as "Test - " in Google DriveAnonymoushttps://www.blogger.com/profile/09027890349607503331noreply@blogger.com