在我的Google驱动器上,我有一个包含2006个文件的文件夹。
这些文件按名称排序。 (来自a - > z)
这是我的文件夹中的文件的确切顺序:
现在,我还有一个Google表,上面写着相同的文件名。每个单元格一个文件名。它们是字母顺序的(来自A - > z)
这是列内的文件的确切顺序:
文件名不按相同的顺序排序。
我该怎么做?
也许我应该使用Google表中的公式重新排序列中的文件名?
On my Google Drive I have a folder containing 2006 files.
These files are sorted by names. (from A -> Z)
Here's the exact order of the files inside my folder: https://gist.github.com/cuzureau/a36deb8e02ab0f2e0523cd58f2cf0950
Now, I also have a Google Sheet with the same file names written in a column. One file name per cell. They are order alphabetically (from A -> Z)
Here's the exact order of the files inside the column: https://gist.github.com/cuzureau/6fe722b821ce3aa60b697819b64d6b05
The files names are not sorted in the same order.
How can I do that ?
Maybe I should use a formula in Google Sheets to reorder the files names in the column ?
发布评论
评论(1)
这是使用Google Apps脚本的两个可能的解决方案(均使用前100个文件测试):
使用DriveApp Enter在表中直接获取名称
Extensions>应用脚本
简单直接创建新的表,
则可以替代。
如果您在同一行中有更多数据,如果您不想创建新表, /代码>我邀请您测试它们。
文档:
These are two possible solutions using Google Apps Script (both tested with the first 100 files):
Grab the names directly using DriveApp
Extensions > Apps Script
Short directly creating a new sheet
This is an alternative if you have more data in the same row
If you don't want to create a new sheet, you have available the methods
moveTo
andmoveRows
I invite you to test them.Documentation: