So I use this code to specify the folder in google drive that i want but I'm hoping there is a better way?
var folders = DriveApp.searchFolders("title contains '"+Values[3]+"' and 'jlfXPTjmRlS2dQf5SS3RaUWM....' in parents");
while (folders.hasNext()) {
var folder = folders.next();
var folder = folder.getId();
var subfolders = DriveApp.searchFolders("title contains '"+Values[4]+"' and '"+folder+"' in parents");
while (subfolders.hasNext()) {
var subfolder = subfolders.next(); // got My folder here!
// *Actions*
}}
The folder i want to specify is nested as such:
/shared folder(known by id)/subfolder(known by name)/subfolder(known by name)
My guess is this should be done with DocsList.getFolder(path) but I can't get it to work. Also I need this code to be compatible for collaborators that I have shared the base folder with.