缺少Google Apps脚本来源,部署的应用程序作品,如何恢复? [英] Missing Google Apps Script source, deployed app works, how to recover?

查看:71
本文介绍了缺少Google Apps脚本来源,部署的应用程序作品,如何恢复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用

解决方案

搜索文件:

  function getTheFile(){
var files = DriveApp.searchFiles('title containsPartial在这里命名');

while(files.hasNext()){
var file = files.next();
Logger.log(file.getName());
}
};

其中说明:部分名称在此输入文件的名称或部分文本文件名。



如果您可以在代码中找到该文件,并拥有该文件,则可以使用DriveApp制作该文件。


I use the https://script.google.com editor to edit my Google Apps Scripts. One of my scripts is 'missing' and I can not find it anywhere on my Google Drive. The 'deployed web app' continues to work though. Is there any means to recover this script so that I can edit it again?

On 2 October 2015, I used the 'Make a copy' option within script.google.com for this script to branch it off for another project. I am worried that this step may have removed the previous script's source? I just now tried a test of this action and it properly resulted in two distinct scripts. Hmmm.

For my 'copied' script, I did save an initial revision of it within script.google.com, so perhaps I could revert back to that revision and get a close copy to what I started off with. But I can not figure out how to revert the code back to that revision either.

Here's an image of what shows on drive.google.com for the copied script.

解决方案

Here is some code that you can run to search for the file:

function getTheFile() {
  var files = DriveApp.searchFiles('title contains "Partial Name Here"');

 while (files.hasNext()) {
   var file = files.next();
   Logger.log(file.getName());
 }
};

Where it states: "Partial Name Here" Enter the name of the file, or a partial text of the file name.

If you can find the file in code, and you own it, you can make a copy of it with DriveApp.

这篇关于缺少Google Apps脚本来源,部署的应用程序作品,如何恢复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆