0
는 어떻게 응용 프로그램 스크립트 스크립트 파일의 내용을 복사 한 다음 복사 된 내용과 동일한 계정에서 다른 응용 프로그램 스크립트 스크립트 파일의 내용을 대체를 열 수 있습니까?한 스크립트 파일의 내용을 복사하고 다른 스크립트 파일의 내용을 바꾸는 방법은 무엇입니까?
// open file to copy from
var file = DriveApp.getFileById(fileIdToCopyFrom);
// copy file contents?
var copiedContents = file.getAs('text/plain'); // generates error: Converting from application/vnd.google-apps.script to application/pdf is not supported.
// replace file contents with copied content
DriveApp.getFileById(fileIdToCopyTo).setContent(copiedContents);