本文介绍了自动将文件从一个文件夹移动到Google云端硬盘中的另一个文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:

文件会自动从我的电子邮件中提取到我的Google云端硬盘中的文件夹中.系统会自动为文件指定一个名称,该名称就是电子邮件的主题,例如海滩".因此,如果电子邮件具有相同的主题名称,则多个文件可以具有相同的名称.

Files get pulled automatically from my emails to a folder on my Google Drive.The files are automatically given a name, which was the subject of the email, e.g. "Beach". Multiple files can thus have the same name if emails have the same subject name.

文件放入Google云端硬盘后,我想将文件(例如称为海滩"的文件)移动到另一个名为海滩"的文件夹中.

Once the files have landed in Google Drive, I want to move the files, say the ones called "Beach", to another folder called "Beach".

做到这一点的最佳方法是什么?我尝试在电子表格中使用脚本,文件夹/ID/文件名列表等,但还不太了解.

What is the best way to do this? I have tried using scripts, lists of folders/ID/file names etc in spreadsheets, yet can't quite get it.

推荐答案

根据此文章,您可以使用Google Apps脚本在文件夹之间移动文件.

According to this article, you can use Google Apps Scripts to move files across folders.

function moveFiles(source_folder, dest_folder) {

  var files = source_folder.getFiles();

  while (files.hasNext()) {

    var file = files.next();
    dest_folder.addFile(file);
    source_folder.removeFile(file);

  }
}

以下一些相关的主题可能会有所帮助:

Here are some related threads which might help:

  • Google Drive: Move file to folder
  • SCRIPT TO MOVE FILES FROM MYDRIVE TO ANOTHER FOLDER IN GOOGLE DRIVE

这篇关于自动将文件从一个文件夹移动到Google云端硬盘中的另一个文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 17:54