1
votes

My understanding is that placing a file in multiple parent folders is no longer allowed on Drive (per the announcement of the single-parent model).

Using Google Apps Script methods (specifically DriveApp methods) to find the parent of a file, it seems I still have to obtain a folder iterator first using file.getParents(). Then use the folder iterator to find the parent folder.

Is this correct? I don't understand why there isn't a file.getParent() method now that would directly provide the parent folder.

1
what have you tried? how does it work? - Cooper
@Cooper getParents() still works just the same with FileIterator - Trigaten

1 Answers

1
votes

Yes. That is correct. Currently, There isn't a file.getParent() method to directly get the parent Folder. You can create a feature request here.