google apps script - removeFolder doesn't work -
i'm not sure wrong script.
var foldertodelete = driveapp.getfoldersbyname('foldername').next(); driveapp.removefolder(foldertodelete);
it doesn't show errors , folder not removed
it's sure folder name 'foldername' exists
thanks!
works fine me, searching or using items view?
maybe have multiple folders same name.
removefolder removes folder root of drive. form documentation:
removes given folder root of user's drive. this method not delete folder or contents, if folder removed of parents, cannot seen in drive except searching or using "all items" view.
are looking settrashed()?
foldertodelete.settrashed(true)
Comments
Post a Comment