如何从谷歌硬盘垃圾文件夹中自动删除文件? [英] How to automatically delete file from google drive trash folder?
问题描述
这里是我看过的一篇文章:永久删除谷歌驱动器中的文件
我想每隔一小时左右自动删除谷歌垃圾文件夹项目。优选每10分钟一次。谷歌需要实现这个有用的功能。
正如在[永久删除文件从谷歌驱动器],您可以启用云端硬盘API,以通过Appscript访问该方法。查看 appscript配额,以确保您的实施可以支持呼叫该API每隔十分钟一次。
您可以使用此解决方案:
function createTimeDrivenTriggers(){
ScriptApp.newTrigger('emptyThrash')
.timeBased()
.everyHours(1)
.create();
函数emptyThrash()
{
Drive.Files.emptyTrash();
}
There are several articles, but I am not able to put a code together to run it successfully.
here one article I have looked at: Permanently delete file from google drive
I would like to automatically delete google trash folder items every hour or so. Prefer every 10 minutes. Google need to implement this useful feature.
As stated on [ Permanently delete file from google drive ], you can enable the Drive API in order to get access to the method, through Appscript. Take a look at appscript quotas to ensure that your implementation can support calling the API every ten minutes.
You can use this solution:
function createTimeDrivenTriggers() {
ScriptApp.newTrigger('emptyThrash')
.timeBased()
.everyHours(1)
.create();
}
function emptyThrash()
{
Drive.Files.emptyTrash();
}
这篇关于如何从谷歌硬盘垃圾文件夹中自动删除文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!