We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0621245 commit ea4f29bCopy full SHA for ea4f29b
ManageGoogleDriveFilesAndFolders.js
@@ -42,4 +42,17 @@ function arrangeDocsToFolders() {
42
allFiles[i].removeFromFolder(rootFolder);
43
}
44
45
-}
+}
46
+// Loop through all the user's Google Drive files and
47
+// return a JavaScript object literal mapping the file names to
48
+// the file IDs.
49
+function getFileNameIdMap() {
50
+ var files = DocsList.getAllFiles(),
51
+ fileNameIdMap = {},
52
+ i,
53
+ fileCount = files.length;
54
+ for (i = 0; i< fileCount; i += 1) {
55
+ fileNameIdMap[files[i].getName()] = files[i].getId();
56
+ }
57
+ return fileNameIdMap;
58
0 commit comments