How do I create a folder in Google Drive from only a pathname? Preferably I need the code to not fail if either the folder or any of it's sub-folders already exist.
In the script I'm working in I only have the path name to a folder that I need to create in Google Drive:
newFolder = '/Path/To My/New Folder/';
If I use the following code:
DocsList.createFolder(newFolder);
It will create a folder at the root level called "/Path/To My/New Folder/"
My understanding is the correct syntax would be:
DocsList.createFolder('Path').createFolder('To My').createFolder('New Folder');
However if I only know the path, do not know how many sub-folders the path could contain, and do not know which of the folders/ sub folders exist what code should I use to create the folder from only a path?
Any suggestions much appreciated.