简体   繁体   中英

Google Apps Scripts - Exception

function moveFiles(sourceFile, targetFolder) {
  var file = DriveApp.getFileById(sourceFile);
  var folder = DriveApp.getFolderById(targetFolder);
  file.moveTo(folder);
}

When running this code i am getting the error:

Exception: Invalid argument: id moveFiles @ Code.gs:16

I have turning off disabling Chrome V8 runtime. However throws up a serer error. Thanks in advance.

已修复,我提供给脚本的文件 ID 不正确。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM