{"id":301,"date":"2025-05-26T14:26:44","date_gmt":"2025-05-26T05:26:44","guid":{"rendered":"https:\/\/cg-method.com\/google\/?p=301"},"modified":"2026-09-26T12:31:56","modified_gmt":"2026-09-26T03:31:56","slug":"google-drive-folder-listing-gas","status":"publish","type":"post","link":"https:\/\/cg-method.com\/google\/google-drive-folder-listing-gas\/","title":{"rendered":"Google\u30c9\u30e9\u30a4\u30d6\u2502\u30d5\u30a9\u30eb\u30c0\u5185\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u89a7\u53d6\u5f97\u3059\u308b\u30c4\u30fc\u30eb"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google\u30c9\u30e9\u30a4\u30d6\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u62ec\u3067\u4e00\u89a7\u5316\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u3084\u5171\u6709\u30c9\u30e9\u30a4\u30d6\u3067\u306e\u4f5c\u696d\u304c\u5897\u3048\u308b\u3068\u3001\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3084\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3092\u542b\u3080\u5168\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u5ea6\u306b\u628a\u63e1\u3057\u305f\u3044\u5834\u9762\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u624b\u4f5c\u696d\u3067\u306e\u78ba\u8a8d\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u8a18\u4e8b\u3067\u306f<strong>Google Apps Script\uff08GAS\uff09<\/strong>\u3092\u4f7f\u3063\u3066\u3001<strong>\u30d5\u30a9\u30eb\u30c0\u306eURL\u3092\u5165\u529b\u3059\u308b\u3060\u3051\u3067\u3001\u5168\u30d5\u30a1\u30a4\u30eb\u60c5\u5831\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u4e00\u89a7\u51fa\u529b\u3059\u308b\u30c4\u30fc\u30eb<\/strong>\u306e\u5b9f\u88c5\u624b\u9806\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u51e6\u7406\u306e\u6d41\u308c<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u8ffd\u52a0\u3055\u308c\u305f\u30ab\u30b9\u30bf\u30e0\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u5b9f\u884c\u3057\u3001\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306bGoogle\u30c9\u30e9\u30a4\u30d6\u306e\u30d5\u30a9\u30eb\u30c0URL\u3092\u5165\u529b\u3059\u308b\u3068\u3001\u65b0\u898f\u30b7\u30fc\u30c8\u306b\u5bfe\u8c61\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-columns\" style=\"--clmn-w--pc:33.33%\"><div class=\"swell-block-columns__inner\">\n<div class=\"swell-block-column swl-has-mb--s\">\n<figure class=\"wp-block-image size-full is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"177\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_47.png\" alt=\"\" class=\"wp-image-304\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_47.png 953w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_47-300x56.png 300w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_47-768x143.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"swell-block-column swl-has-mb--s\">\n<figure class=\"wp-block-image size-full is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"498\" height=\"325\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_00.png\" alt=\"\" class=\"wp-image-303\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_00.png 498w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_00-300x196.png 300w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"swell-block-column swl-has-mb--s\">\n<figure class=\"wp-block-image size-full is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"510\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42.png\" alt=\"Google\u30c9\u30e9\u30a4\u30d6\u306e\u30d5\u30a9\u30eb\u30c0\u5185\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u305f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u51fa\u529b\u4f8b\u3002\" class=\"wp-image-305\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42.png 780w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42-300x196.png 300w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42-768x502.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n<\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3055\u308c\u308b\u9805\u76ee\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list is-style-num_circle\">\n<li>\u30d5\u30a9\u30eb\u30c0\u540d<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\u540d<\/li>\n\n\n\n<li>\u4f5c\u6210\u65e5<\/li>\n\n\n\n<li>\u30aa\u30fc\u30ca\u30fc<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30ebURL<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5c0e\u5165\u30fb\u4f7f\u7528\u624b\u9806<\/h2>\n\n\n\n<ol class=\"wp-block-list is-style-num_circle\">\n<li>\u65b0\u898f\u307e\u305f\u306f\u5229\u7528\u5bfe\u8c61\u306eGoogle\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u958b\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u4e0a\u90e8\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u62e1\u5f35\u6a5f\u80fd\u300d\u304b\u3089\u300cApps Script\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u8868\u793a\u3055\u308c\u305f\u30a8\u30c7\u30a3\u30bf\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u4fdd\u5b58\u3057\u307e\u3059\uff08\u30d5\u30a1\u30a4\u30eb\u540d\u306f <code>Code.gs<\/code>\uff09\u3002<\/li>\n\n\n\n<li>\u300c\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u300d\u304b\u3089HTML\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066 <code>FolderInputForm.html<\/code> \u3092\u4f5c\u6210\u3057\u3001\u5bfe\u5fdc\u3059\u308bHTML\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3059\u308b\u3068\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u306b\u5c02\u7528\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u3001\u305d\u3053\u304b\u3089\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"is-style-icon_pen wp-block-paragraph\">\u521d\u56de\u5b9f\u884c\u6642\u306b\u306f\u3001Google\u30a2\u30ab\u30a6\u30f3\u30c8\u3078\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u627f\u8a8d\u3059\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u304c\u5b9f\u88c5\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"571\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h18_24-1024x571.png\" alt=\"\u521d\u56de\u5b9f\u884c\u6642\u306b\u8868\u793a\u3055\u308c\u308bGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u3078\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u627f\u8a8d\u30c0\u30a4\u30a2\u30ed\u30b0\u3002\" class=\"wp-image-306\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h18_24-1024x571.png 1024w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h18_24-300x167.png 300w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h18_24-768x428.png 768w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h18_24.png 1142w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u95a2\u3059\u308b\u307b\u304b\u306e\u81ea\u52d5\u5316\u624b\u9806\u306f\u3001\u95a2\u9023\u8a18\u4e8b\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/09\/google-apps-matome-3-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-apps-matome\/\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u30fb\u30c9\u30e9\u30a4\u30d6\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081\uff5c\u95a2\u6570\u3068GAS<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google\u306e\u64cd\u4f5c\u3092\u300c\u4f55\u3092\u3057\u305f\u3044\u304b\u300d\u304b\u3089\u63a2\u305b\u308b\u30ac\u30a4\u30c9\u3067\u3059\u3002 \u307e\u305a\u6a19\u6e96\u306e\u753b\u9762\u64cd\u4f5c\u3084\u95a2\u6570\u3067\u89e3\u6c7a\u3067\u304d\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3001\u7e70\u308a\u8fd4\u3059\u51e6\u7406\u306bGAS\u3092\u4f7f\u3044\u307e\u3059\u3002 \u76ee\u7684\u304b\u3089\u624b\u9806\u3092\u9078\u3076 \u3084\u308a\u305f&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\">\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30c9\uff08Code.gs\uff09<\/h2>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<a href=\"https:\/\/script.google.com\/home\/projects\/create\" class=\"c-blogLink -external\" data-style=\"text\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t<!-- <i class=\"c-blogLink__icon icon-link\" role=\"presentation\"><\/i> -->\n\t\t\t\t<span class=\"c-blogLink__icon\">\n\t\t\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"swl-svg-externalLink __svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 48 48\" role=\"img\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M44 2H30c-1.1 0-2 .9-2 2s.9 2 2 2h9.2L24 21.2c-.8.8-.8 2 0 2.8s2 .8 2.8 0L42 8.8V18c0 1.1.9 2 2 2s2-.9 2-2V4c0-1.1-.9-2-2-2z\" \/><path d=\"M41 27c-1.1 0-2 .9-2 2v10c0 1.1-.9 2-2 2H9c-1.1 0-2-.9-2-2V11c0-1.1.9-2 2-2h10c1.1 0 2-.9 2-2s-.9-2-2-2H9c-3.3 0-6 2.7-6 6v28c0 3.3 2.7 6 6 6h28c3.3 0 6-2.7 6-6V29c0-1.1-.9-2-2-2z\" \/><\/svg>\t\t\t\t<\/span>\n\t\t\t\t<span class=\"c-blogLink__text\">Apps Script \u00a0|\u00a0 Google for Developers<\/span>\n\t\t\t<\/a>\n\t\t<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\uff08Code.gs\uff09\u306b\u8a18\u8ff0\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\/\/ \u30e1\u30cb\u30e5\u30fc\u8ffd\u52a0\nfunction onOpen() {\n  SpreadsheetApp.getUi()\n    .createMenu(&quot;\u30c4\u30fc\u30eb&quot;)\n    .addItem(&quot;\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u51fa\u529b&quot;, &quot;showFolderInputModal&quot;)\n    .addToUi();\n}\n\n\/\/ \u30e2\u30fc\u30c0\u30eb\u3092\u8868\u793a\nfunction showFolderInputModal() {\n  const html = HtmlService.createHtmlOutputFromFile(&#39;FolderInputForm&#39;)\n    .setWidth(400)\n    .setHeight(200);\n  SpreadsheetApp.getUi().showModalDialog(html, &#39;\u30d5\u30a9\u30eb\u30c0URL\u3092\u5165\u529b&#39;);\n}\n\n\/\/ \u30d5\u30a9\u30eb\u30c0URL\u3092\u53d7\u3051\u53d6\u308a\u51e6\u7406\u3092\u958b\u59cb\nfunction processFolderUrl(folderUrl) {\n  const folderId = extractFolderId(folderUrl);\n  if (!folderId) {\n    throw new Error(&quot;\u30d5\u30a9\u30eb\u30c0URL\u304c\u7121\u52b9\u3067\u3059&quot;);\n  }\n\n  const folder = DriveApp.getFolderById(folderId);\n  const folderData = getAllSubFolders(folderId);\n  const sheet = createSheetWithFolderName(folder.getName());\n  writeFilesToSheet(sheet, folderData);\n}\n\n\/\/ \u30d5\u30a9\u30eb\u30c0ID\u62bd\u51fa\nfunction extractFolderId(url) {\n  const match = url.match(\/[-\\w]{25,}\/);\n  return match ? match[0] : null;\n}\n\n\/\/ \u30d5\u30a9\u30eb\u30c0\u540d+\u65e5\u4ed8+\u6642\u523b\u3067\u65b0\u30b7\u30fc\u30c8\u4f5c\u6210\nfunction createSheetWithFolderName(folderName) {\n  const now = new Date();\n  const timestamp = Utilities.formatDate(now, Session.getScriptTimeZone(), &quot;yyyyMMdd_HHmm&quot;);\n  const sheetName = `${folderName}_${timestamp}`.slice(0, 99); \/\/ \u30b7\u30fc\u30c8\u540d\u306f\u6700\u5927100\u6587\u5b57\n  const sheet = SpreadsheetApp.getActiveSpreadsheet().insertSheet(sheetName, 0);\n  sheet.activate();\n  return sheet;\n}\n\n\/\/ \u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3092\u518d\u5e30\u7684\u306b\u53d6\u5f97\nfunction getAllSubFolders(rootId) {\n  const folderQueue = [[DriveApp.getFolderById(rootId).getName(), rootId]];\n  const result = [];\n\n  for (let i = 0; i &lt; folderQueue.length; i++) {\n    const [path, id] = folderQueue[i];\n    result.push([path, id]);\n\n    const subFolders = DriveApp.searchFolders(`&#39;${id}&#39; in parents`);\n    while (subFolders.hasNext()) {\n      const subFolder = subFolders.next();\n      const subPath = `${path} &gt; ${subFolder.getName()}`;\n      folderQueue.push([subPath, subFolder.getId()]);\n    }\n  }\n\n  return result;\n}\n\n\/\/ \u30d5\u30a1\u30a4\u30eb\u60c5\u5831\u3092\u30b7\u30fc\u30c8\u306b\u51fa\u529b\nfunction writeFilesToSheet(sheet, folderData) {\n  sheet.clear();\n  const headers = [&quot;\u30d5\u30a9\u30eb\u30c0&quot;, &quot;\u30d5\u30a1\u30a4\u30eb\u540d&quot;, &quot;\u4f5c\u6210\u65e5&quot;, &quot;\u30aa\u30fc\u30ca\u30fc&quot;, &quot;URL&quot;];\n  sheet.getRange(1, 1, 1, headers.length).setValues([headers]);\n\n  let row = 2;\n  folderData.forEach(([folderPath, folderId]) =&gt; {\n    const files = DriveApp.searchFiles(`&#39;${folderId}&#39; in parents`);\n    while (files.hasNext()) {\n      const file = files.next();\n      const values = [\n        folderPath,\n        file.getName(),\n        file.getDateCreated(),\n        file.getOwner().getName(),\n        file.getUrl()\n      ];\n      sheet.getRange(row, 1, 1, values.length).setValues([values]);\n      row++;\n    }\n  });\n}\n<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d9a\u3044\u3066\u3001URL\u5165\u529b\u753b\u9762\u3068\u306a\u308b\u30e2\u30fc\u30c0\u30eb\u7528\u306eHTML\u30b3\u30fc\u30c9\uff08FolderInputForm.html\uff09\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;base target=&quot;_top&quot;&gt;\n    &lt;style&gt;\n      body { font-family: sans-serif; }\n      input { width: 100%; padding: 8px; margin-top: 10px; }\n      button { margin-top: 15px; padding: 8px 12px; }\n    &lt;\/style&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;label&gt;\u30d5\u30a9\u30eb\u30c0\u306eURL\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff1a&lt;\/label&gt;\n    &lt;input type=&quot;text&quot; id=&quot;folderUrl&quot; placeholder=&quot;https:\/\/drive.google.com\/drive\/folders\/xxxxx&quot;&gt;\n    &lt;button onclick=&quot;submit()&quot;&gt;\u5b9f\u884c&lt;\/button&gt;\n\n    &lt;script&gt;\n      function submit() {\n        const url = document.getElementById(&#39;folderUrl&#39;).value;\n        google.script.run.withSuccessHandler(() =&gt; {\n          google.script.host.close();\n        }).withFailureHandler((e) =&gt; {\n          alert(&#39;\u30a8\u30e9\u30fc\uff1a&#39; + e.message);\n        }).processFolderUrl(url);\n      }\n    &lt;\/script&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b3\u30fc\u30c9\u306e\u8a2d\u5b9a\u306f\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u51fa\u529b\u7d50\u679c\u306e\u30a4\u30e1\u30fc\u30b8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u30b7\u30fc\u30c8\u306b\u6b21\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067\u4e00\u89a7\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u30d5\u30a9\u30eb\u30c0<\/th><th>\u30d5\u30a1\u30a4\u30eb\u540d<\/th><th>\u4f5c\u6210\u65e5<\/th><th>\u30aa\u30fc\u30ca\u30fc\u540d<\/th><th>\u30d5\u30a1\u30a4\u30ebURL<\/th><\/tr><\/thead><tbody><tr><td>\u30e1\u30a4\u30f3\u30d5\u30a9\u30eb\u30c0<\/td><td>\u4f01\u753b\u66f8.docx<\/td><td>2024\/12\/01 10:32<\/td><td>\u9234\u6728 \u592a\u90ce<\/td><td><a class=\"\" href=\"https:\/\/drive.google.com\/\">https:\/\/drive.google.com\/<\/a>&#8230;<\/td><\/tr><tr><td>\u30e1\u30a4\u30f3 &gt; \u5b501<\/td><td>\u30c7\u30b6\u30a4\u30f3\u6848.pptx<\/td><td>2024\/12\/01 11:05<\/td><td>\u9234\u6728 \u592a\u90ce<\/td><td><a class=\"\" href=\"https:\/\/drive.google.com\/\">https:\/\/drive.google.com\/<\/a>&#8230;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"510\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42.png\" alt=\"\u30d5\u30a9\u30eb\u30c0\u540d\u3084\u30d5\u30a1\u30a4\u30eb\u540d\u306a\u3069\u306e\u53d6\u5f97\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u305f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u8868\u793a\u753b\u9762\u3002\" class=\"wp-image-305\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42.png 780w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42-300x196.png 300w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/2025-05-26_14h13_42-768x502.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u6ce8\u610f\u70b9<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bfe\u8c61\u30d5\u30a9\u30eb\u30c0\u306b\u5bfe\u3059\u308b\u95b2\u89a7\u6a29\u9650\u304c\u306a\u3044\u5834\u5408\u3001\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002<\/li>\n\n\n\n<li>\u751f\u6210\u3055\u308c\u308b\u30b7\u30fc\u30c8\u540d\u306f\u6700\u5927100\u6587\u5b57\u306b\u81ea\u52d5\u8abf\u6574\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30d6\u30c3\u30af\u5185\u306e\u30b7\u30fc\u30c8\u6570\u304c\u4e0a\u9650\u306b\u8fd1\u3044\u5834\u5408\u3001\u65b0\u3057\u3044\u30b7\u30fc\u30c8\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u3066\u3044\u308b\u30b3\u30fc\u30c9\u306f\u3001GitHub\u306e<a href=\"https:\/\/github.com\/MOTOKI-LLC\/cg-method-code\/tree\/main\/google\/google-drive-folder-listing-gas\">MOTOKI-LLC\/cg-method-code<\/a>\u306b\u3082\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n<!-- cgm-topic:start -->\n\n\n<p class=\"wp-block-paragraph\">Google\u30c9\u30e9\u30a4\u30d6\u306e\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u3092\u6271\u3046\u8a18\u4e8b\u306f\u3001\u307b\u304b\u306b\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/google-drive-folder-file-count-gas-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-drive-folder-file-count-gas\/\">Google\u30c9\u30e9\u30a4\u30d6\u2502\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u6570\u3092\u96c6\u8a08\u3059\u308b\u65b9\u6cd5\u2502GAS<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u5404\u30d5\u30a9\u30eb\u30c0\u306e\u76f4\u4e0b\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u6570\u3092\u96c6\u8a08\u3057\u307e\u3059\u3002 \u89aa\u306e\u884c\u306f\u5b50\u306e\u4ef6\u6570\u3092\u5408\u7b97\u305b\u305a\u3001\u5168\u8d70\u67fb\u306e\u5408\u8a08\u306f\u5b9f\u884c\u30ed\u30b0\u306b\u5206\u3051\u3066\u8868\u793a\u3057\u307e\u3059\u3002 \u30d5\u30a1\u30a4\u30eb\u4ef6\u6570\u306f\u4f7f\u7528\u5bb9\u91cf\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 &#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/google-drive-delete-old-version-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-drive-delete-old-version\/\">Google\u30c9\u30e9\u30a4\u30d6\u2502\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7248\u30c7\u30fc\u30bf\u3092\u624b\u52d5\u3067\u524a\u9664\u3059\u308b\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google\u30c9\u30e9\u30a4\u30d6\u306b\u4fdd\u5b58\u3057\u305fPDF\u3084\u753b\u50cf\u306a\u3069\u306f\u3001\u300c\u7248\u3092\u7ba1\u7406\u300d\u304b\u3089\u65b0\u3057\u3044\u7248\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3001\u540c\u3058\u30d5\u30a1\u30a4\u30eb\u306e\u5c65\u6b74\u3068\u3057\u3066\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002 Google\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30fb\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/drive-create-folder-tomorrow-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/drive-create-folder-tomorrow\/\">Google\u30c9\u30e9\u30a4\u30d6\u2502\u660e\u65e5\u306e\u65e5\u4ed8\u30d5\u30a9\u30eb\u30c0\u3092\u81ea\u52d5\u4f5c\u6210\u3059\u308b\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u306f\u3058\u3081\u306b\u3001\u30b3\u30fc\u30c9\u5185\u306e\u30d5\u30a9\u30eb\u30c0ID\u3068\u540d\u524d\u4e00\u89a7\u3092\u3054\u81ea\u8eab\u306e\u3082\u306e\u306b\u5909\u66f4\u3057\u3001\u4f5c\u6210\u6a29\u9650\u306e\u3042\u308b\u30c6\u30b9\u30c8\u7528\u30d5\u30a9\u30eb\u30c0\u3067\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u65e5\u4ed8\u3092\u65e5\u672c\u6642\u9593\u3067\u6271\u3046\u305f\u3081\u3001Apps Script\u306e\u30d7\u30ed&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/google-drive-gas-get-urls-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/gas-get-drive-file-urls\/\">Google\u30c9\u30e9\u30a4\u30d6\u2502\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30ebURL\u3092\u4e00\u62ec\u53d6\u5f97\u3057\u3066\u51fa\u529b\u3059\u308b\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u6307\u5b9a\u3057\u305fDrive\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u30fb\u95b2\u89a7URL\u30fb\u30d5\u30a1\u30a4\u30ebID\u3092\u4e00\u89a7\u306b\u3057\u307e\u3059\u3002 \u8d70\u67fb\u304c\u7d42\u308f\u3063\u3066\u304b\u3089\u65b0\u3057\u3044\u7d50\u679c\u30b7\u30fc\u30c8\u3092\u4f5c\u308b\u305f\u3081\u3001\u65e2\u5b58\u306e\u4e00\u89a7\u3078\u8ffd\u8a18\u30fb\u4e0a\u66f8\u304d\u3057\u307e\u305b\u3093\u3002 &#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<!-- cgm-topic:end -->\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">GAS\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u624b\u4f5c\u696d\u3067\u884c\u3063\u3066\u3044\u305fGoogle\u30c9\u30e9\u30a4\u30d6\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u78ba\u8a8d\u3084\u68da\u5378\u3057\u3092\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u306e\u628a\u63e1\u3084\u5b9a\u671f\u7684\u306a\u30d5\u30a1\u30a4\u30eb\u6574\u7406\u306b\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d39\u4ecb\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u8a2d\u5b9a\u3057\u3001<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u3005\u306e\u30d5\u30a1\u30a4\u30eb\u7ba1\u7406\u696d\u52d9\u306e\u52b9\u7387\u5316\u306b\u5f79\u7acb\u3066\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Google\u30c9\u30e9\u30a4\u30d6\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u62ec\u3067\u4e00\u89a7\u5316\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u30ea\u30e2\u30fc\u30c8\u30ef\u30fc\u30af\u3084\u5171\u6709\u30c9\u30e9\u30a4\u30d6\u3067\u306e\u4f5c\u696d\u304c\u5897\u3048\u308b\u3068\u3001\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3084\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3092\u542b\u3080\u5168\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u5ea6\u306b\u628a\u63e1\u3057\u305f\u3044\u5834\u9762\u304c\u3042\u308a\u307e\u3059\u3002 \u624b\u4f5c\u696d\u3067\u306e\u78ba\u8a8d\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":302,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","book_review_data":"","footnotes":"","ssp_meta_title":"Google\u30c9\u30e9\u30a4\u30d6\u306e\u30d5\u30a9\u30eb\u30c0\u4e00\u89a7\u3092GAS\u3067\u51fa\u3059","ssp_meta_description":"Google\u30c9\u30e9\u30a4\u30d6\u306e\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3092\u3001GAS\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u51fa\u3059\u65b9\u6cd5\u3067\u3059\u3002\u968e\u5c64\u3092\u305f\u3069\u3063\u3066\u4e00\u89a7\u306b\u3067\u304d\u308b\u306e\u3067\u3001\u6574\u7406\u524d\u306e\u68da\u5378\u3057\u306b\u4f7f\u3048\u307e\u3059\u3002"},"categories":[19],"tags":[18],"class_list":["post-301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-drive","tag-gas"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/comments?post=301"}],"version-history":[{"count":10,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":23440,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/301\/revisions\/23440"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/media\/302"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/media?parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/categories?post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/tags?post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}