{"id":19463,"date":"2021-01-08T19:13:30","date_gmt":"2021-01-08T10:13:30","guid":{"rendered":"https:\/\/cg-method.com\/?p=19463"},"modified":"2026-09-12T07:43:41","modified_gmt":"2026-09-11T22:43:41","slug":"gas-copy-files-between-folders","status":"publish","type":"post","link":"https:\/\/cg-method.com\/google\/gas-copy-files-between-folders\/","title":{"rendered":"Google\u30c9\u30e9\u30a4\u30d6\u2502\u30d5\u30a9\u30eb\u30c0\u3092\u30b3\u30d4\u30fc\u3059\u308b\u65b9\u6cd5\u3068\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u3066\u8907\u88fd\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google\u30c9\u30e9\u30a4\u30d6\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u4e38\u3054\u3068\u30b3\u30d4\u30fc\u3057\u3088\u3046\u3068\u3057\u3066\u3001\u30e1\u30cb\u30e5\u30fc\u306b\u898b\u5f53\u305f\u3089\u305a\u6238\u60d1\u3063\u305f\u65b9\u306f\u591a\u3044\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Google\u30c9\u30e9\u30a4\u30d6\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306f\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u304c\u3001\u30d5\u30a9\u30eb\u30c0\u306f\u30b3\u30d4\u30fc\u3067\u304d\u307e\u305b\u3093\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ed5\u69d8\u306a\u306e\u3067\u3001\u63a2\u3057\u3066\u3082\u51fa\u3066\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u306b\u3001\u3084\u308a\u305f\u3044\u3053\u3068\u3054\u3068\u306e\u7b54\u3048\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u3084\u308a\u305f\u3044\u3053\u3068<\/th><th>\u3084\u308a\u65b9<\/th><\/tr><\/thead><tbody><tr><td>\u30d5\u30a1\u30a4\u30eb1\u3064\u3092\u8907\u88fd<\/td><td>\u53f3\u30af\u30ea\u30c3\u30af \u2192\u300c\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u300d<\/td><\/tr><tr><td>\u30d5\u30a1\u30a4\u30eb\u3092\u8907\u6570\u307e\u3068\u3081\u3066\u8907\u88fd<\/td><td>\u307e\u3068\u3081\u3066\u9078\u629e\u3057\u3066\u304b\u3089\u300c\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u300d<\/td><\/tr><tr><td><strong>\u30d5\u30a9\u30eb\u30c0\u3054\u3068\u8907\u88fd<\/strong><\/td><td><strong>\u6a5f\u80fd\u306a\u3057\u3002<\/strong>\u4e2d\u8eab\u3092\u9078\u3093\u3067\u30b3\u30d4\u30fc\u3057\u3001\u65b0\u3057\u3044\u30d5\u30a9\u30eb\u30c0\u3078\u79fb\u3059<\/td><\/tr><tr><td>\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3082\u542b\u3081\u3066\u8907\u88fd<\/td><td>\u624b\u4f5c\u696d\u3067\u306f\u53b3\u3057\u3044\u3002<strong>GAS\u3067\u81ea\u52d5\u5316\u3059\u308b<\/strong><\/td><\/tr><tr><td>\u898b\u3064\u3051\u3084\u3059\u304f\u3057\u305f\u3044\u3060\u3051<\/td><td>\u30b3\u30d4\u30fc\u305b\u305a\u300c\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f5c\u6210\u300d\u3067\u8db3\u308a\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u30d5\u30a1\u30a4\u30eb\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3059\u308b<\/li>\n\n\n\n<li><strong>\u300c\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u300d<\/strong>\u3092\u9078\u3076<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306b\u300c\u3007\u3007\u306e\u30b3\u30d4\u30fc\u300d\u3068\u3044\u3046\u540d\u524d\u3067\u4f5c\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u3093\u3067\u304b\u3089\u3067\u3082\u540c\u3058\u64cd\u4f5c\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Shift<\/code> \u3092\u62bc\u3057\u306a\u304c\u3089\u9078\u3076\u3068\u7bc4\u56f2\u3067\u3001<code>Ctrl<\/code>\uff08Mac\u306f <code>&#8984;<\/code>\uff09\u3092\u62bc\u3057\u306a\u304c\u3089\u3060\u3068\u98db\u3073\u98db\u3073\u3067\u9078\u3079\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a9\u30eb\u30c0\u3092\u8907\u88fd\u3057\u305f\u3044\u3068\u304d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30eb\u30c0\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u300c\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u300d\u306f\u51fa\u3066\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u624b\u4f5c\u696d\u3067\u3084\u308b\u306a\u3089\u6b21\u306e\u624b\u9806\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u30b3\u30d4\u30fc\u5148\u306b\u306a\u308b\u65b0\u3057\u3044\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u308b<\/li>\n\n\n\n<li>\u5143\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u958b\u304d\u3001\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5168\u90e8\u9078\u3076\uff08<code>Ctrl+A<\/code>\uff09<\/li>\n\n\n\n<li>\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u300c\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u300d<\/li>\n\n\n\n<li>\u3067\u304d\u305f\u30b3\u30d4\u30fc\u3092\u307e\u3068\u3081\u3066\u9078\u3073\u3001\u65b0\u3057\u3044\u30d5\u30a9\u30eb\u30c0\u3078\u79fb\u52d5\u3059\u308b<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u3053\u306e\u65b9\u6cd5\u3067\u306f\u3001\u4e2d\u306b\u3042\u308b\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u306f\u30b3\u30d4\u30fc\u3055\u308c\u307e\u305b\u3093\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u968e\u5c64\u304c\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u3060\u3068\u3001\u968e\u5c64\u306e\u6570\u3060\u3051\u540c\u3058\u4f5c\u696d\u3092\u7e70\u308a\u8fd4\u3059\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3053\u304c\u73fe\u5b9f\u7684\u3067\u306a\u3044\u306e\u3067\u3001\u5f8c\u534a\u306eGAS\u306b\u305f\u3069\u308a\u7740\u304f\u3001\u3068\u3044\u3046\u6d41\u308c\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5165\u308c\u76f4\u3059\u65b9\u6cd5\u306f\u3059\u3059\u3081\u306a\u3044<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30eb\u30c0\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u307e\u305f\u4e0a\u3052\u76f4\u305b\u3070\u30b3\u30d4\u30fc\u306b\u306a\u308b\u3068\u601d\u308f\u308c\u304c\u3061\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3060\u3057<strong>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3068Google\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u306fOffice\u5f62\u5f0f\u306b\u5909\u308f\u308a\u307e\u3059<\/strong>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306fxlsx\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306fdocx\u306b\u306a\u3063\u3066\u623b\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u95a2\u6570\u3084\u5171\u6709\u306e\u8a2d\u5b9a\u3001\u30b3\u30e1\u30f3\u30c8\u3082\u5931\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5199\u771f\u3084PDF\u3060\u3051\u306e\u30d5\u30a9\u30eb\u30c0\u306a\u3089\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u305d\u308c\u4ee5\u5916\u3067\u306f\u907f\u3051\u305f\u307b\u3046\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u898b\u3064\u3051\u3084\u3059\u304f\u3057\u305f\u3044\u3060\u3051\u306a\u3089\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u300c\u5225\u306e\u5834\u6240\u304b\u3089\u3082\u958b\u304d\u305f\u3044\u300d\u3060\u3051\u306a\u3089\u3001\u8907\u88fd\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53f3\u30af\u30ea\u30c3\u30af\u306e<strong>\u300c\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f5c\u6210\u300d<\/strong>\u3067\u3001\u5225\u306e\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u958b\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u4f53\u306f1\u3064\u306e\u307e\u307e\u306a\u306e\u3067\u3001\u5bb9\u91cf\u3082\u5897\u3048\u305a\u3001\u66f4\u65b0\u30821\u304b\u6240\u3067\u6e08\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3054\u3068\u8907\u88fd\u3059\u308b\u306a\u3089GAS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u304b\u3089\u304c\u81ea\u52d5\u5316\u306e\u8a71\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u8eab\u3092\u307e\u3068\u3081\u3066\u5225\u306e\u30d5\u30a9\u30eb\u30c0\u3078\u30b3\u30d4\u30fc\u3059\u308b\u51e6\u7406\u3092\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u52d5\u304b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Google\u5f62\u5f0f\u306e\u307e\u307e\u8907\u88fd\u3055\u308c\u308b\u306e\u3067\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u76f4\u3059\u65b9\u6cd5\u306e\u3088\u3046\u306a\u5f62\u5f0f\u306e\u5909\u5316\u306f\u8d77\u304d\u307e\u305b\u3093\u3002<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u3092\u79fb\u52d5\u30b3\u30d4\u30fc\u3059\u308bGAS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u3048\u3070\u3001<strong>\u5143\u306e\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u3059\u3079\u3066\u5225\u30d5\u30a9\u30eb\u30c0\u306b\u8907\u88fd<\/strong>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>function copyMoveFile() {\n  \/\/ \u30b3\u30d4\u30fc\u5143\u306e\u30d5\u30a9\u30eb\u30c0ID\u3092\u6307\u5b9a\n  var source_dat = DriveApp.getFolderById(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;);\n\n  \/\/ \u30b3\u30d4\u30fc\u5148\u306e\u30d5\u30a9\u30eb\u30c0ID\u3092\u6307\u5b9a\n  var copy_dir = DriveApp.getFolderById(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;);\n\n  \/\/ \u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\n  var files = source_dat.getFiles();\n\n  while (files.hasNext()) {\n    var file = files.next();\n    var f = file.makeCopy(file.getName(), copy_dir);\n\n    \/\/ Google Apps Script\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u5408\u306f\u7279\u6b8a\u51e6\u7406\n    if (file.getMimeType() === MimeType.GOOGLE_APPS_SCRIPT) {\n      Drive.Files.update({ parents: [{ id: copy_dir }] }, f.getId());\n    }\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2021\/01\/2021-01-08_18h49_45.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u3044\u65b9\u624b\u9806<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Google Apps Script \u30a8\u30c7\u30a3\u30bf\u3092\u958b\u304f<\/li>\n\n\n\n<li>\u4e0a\u8a18\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8cbc\u308a\u4ed8\u3051<\/li>\n\n\n\n<li><code>source_dat<\/code> \u3068 <code>copy_dir<\/code> \u306b\u3001\u305d\u308c\u305e\u308c<strong>\u30b3\u30d4\u30fc\u5143\u3068\u30b3\u30d4\u30fc\u5148\u306e\u30d5\u30a9\u30eb\u30c0ID<\/strong>\u3092\u5165\u529b<\/li>\n\n\n\n<li>\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u95a2\u6570 <code>copyMoveFile()<\/code> \u3092\u5b9f\u884c<\/li>\n\n\n\n<li>\u5b8c\u4e86\uff01\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30d4\u30fc\u5148\u306b\u8907\u88fd\u3055\u308c\u307e\u3059<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u6ce8\u610f\u70b9<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Google Apps Script\uff08.gs\uff09\u30d5\u30a1\u30a4\u30eb\u306f\u901a\u5e38\u306e\u30b3\u30d4\u30fc\u3067\u306f\u52d5\u4f5c\u3057\u306a\u3044<\/strong>\u305f\u3081\u3001<code>Drive.Files.update()<\/code> \u3092\u4f75\u7528\u3057\u3066\u3044\u307e\u3059\uff08GAS\u306e\u62e1\u5f35\u30b5\u30fc\u30d3\u30b9\u304c\u6709\u52b9\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff09<\/li>\n\n\n\n<li>\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u306f\u3057\u306a\u3044\u306e\u3067\u3001\u300c\u79fb\u52d5\u300d\u3067\u306f\u306a\u304f\u300c\u30b3\u30d4\u30fc\u300d\u3067\u3059<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u304a\u307e\u3051\u2502\u8907\u88fd\u7cfb\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u4f8b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f3c\u305f\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u7d39\u4ecb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u3092\u8907\u6570\u30b3\u30d4\u30fc\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u547d\u540d\u898f\u5247\u306b\u305d\u3063\u3066\uff64\u3055\u304f\u3063\u3068\u30b3\u30d4\u30fc\u3057\u305f\u3044\u6642\u306b\u4f7f\u3048\u307e\u3059\uff61<\/p>\n\n\n\n<div class=\"wp-block-group has-border -border01 is-style-bg_stripe\"><div class=\"wp-block-group__inner-container\">\n<ul class=\"wp-block-list\">\n<li>\u30b3\u30d4\u30fc\u3059\u308b\u30d5\u30a1\u30a4\u30ebID<\/li>\n\n\n\n<li>\u30b3\u30d4\u30fc\u5148\u306e\u30d5\u30a9\u30eb\u30c0ID<\/li>\n\n\n\n<li>\u8907\u88fd\u3057\u305f\u3044\u500b\u6570<\/li>\n\n\n\n<li>\u8907\u88fd\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u540d<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3092\u5165\u529b\u3057\u3066GAS\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\uff61<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>function copyFile()\n{\n  \/\/\u30b3\u30d4\u30fc\u3059\u308b\u30d5\u30a1\u30a4\u30eb\uff08\u30d5\u30a1\u30a4\u30ebID\u3092\u5165\u529b\uff09\n  var source_dat = DriveApp.getFileById(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;);\n    \n  \/\/\u4fdd\u5b58\u3059\u308b\u5834\u6240\uff08\u30d5\u30a9\u30eb\u30c0ID\u3092\u5165\u529b\uff09\n  var copy_dir = DriveApp.getFolderById(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;);\n\n  \/\/\u8907\u88fd\u3057\u305f\u3044\u500b\u6570\n  var last = 9;\n\n  \/\/\u8907\u88fd\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u540d\uff08\u8907\u88fd\u3057\u305f\u3044\u500b\u6570\u6587\u5165\u529b\uff09\n  var file_names = [\n    &quot;01_\u6c34\u67f1_\u51a8\u5ca1\u7fa9\u52c7\uff08\u3068\u307f\u304a\u304b\u30fb\u304e\u3086\u3046\uff09&quot;,\n    &quot;02_\u708e\u67f1_\u7149\u7344\u674f\u5bff\u90ce\uff08\u308c\u3093\u3054\u304f\u30fb\u304d\u3087\u3046\u3058\u3085\u308d\u3046\uff09&quot;,\n    &quot;03_\u87f2\u67f1_\u80e1\u8776\uff08\u3053\u3061\u3087\u3046\uff09\u3057\u306e\u3076&quot;,\n    &quot;04_\u97f3\u67f1_\u5b87\u9ac4\u5929\u5143\uff08\u3046\u305a\u3044\u30fb\u3066\u3093\u3052\u3093\uff09&quot;,\n    &quot;05_\u604b\u67f1_\u7518\u9732\u5bfa\u871c\u7483\uff08\u304b\u3093\u308d\u3058\u30fb\u307f\u3064\u308a\uff09&quot;,\n    &quot;06_\u971e\u67f1_\u6642\u900f\u7121\u4e00\u90ce\uff08\u3068\u304d\u3068\u3046\u30fb\u3080\u3044\u3061\u308d\u3046\uff09&quot;,\n    &quot;07_\u5ca9\u67f1_\u60b2\u9cf4\u5dbc\u884c\u51a5\uff08\u3072\u3081\u3058\u307e\u30fb\u304e\u3087\u3046\u3081\u3044\uff09&quot;,\n    &quot;08_\u86c7\u67f1_\u4f0a\u9ed2\u5c0f\u82ad\u5185\uff08\u3044\u3050\u308d\u30fb\u304a\u3070\u306a\u3044\uff09&quot;,\n    &quot;09_\u98a8\u67f1_\u4e0d\u6b7b\u5ddd\u5b9f\u5f25\uff08\u3057\u306a\u305a\u304c\u308f\u30fb\u3055\u306d\u307f\uff09&quot;,\n  ];\n\n  for (let i = 0; i &lt;= last - 1; i++) {\n    source_dat.makeCopy(file_names[i], copy_dir);\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"881\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2021\/01\/2021-01-08_18h27_49.jpg\" alt=\"\" class=\"wp-image-19464\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2021\/01\/2021-01-08_18h27_49.jpg 707w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2021\/01\/2021-01-08_18h27_49-241x300.jpg 241w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u3092\u79fb\u52d5\u30b3\u30d4\u30fc\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30c7\u30fc\u30bf\u3092\u79fb\u52d5\u30b3\u30d4\u30fc\u3057\u305f\u3044\u6642\u306b\u4f7f\u3048\u307e\u3059\uff61<\/p>\n\n\n\n<div class=\"wp-block-group has-border -border01 is-style-bg_stripe\"><div class=\"wp-block-group__inner-container\">\n<ul class=\"wp-block-list\">\n<li>\u30b3\u30d4\u30fc\u3059\u308b\u30d5\u30a9\u30eb\u30c0ID<\/li>\n\n\n\n<li>\u30b3\u30d4\u30fc\u5148\u306e\u30d5\u30a9\u30eb\u30c0ID<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3092\u5165\u529b\u3057\u3066GAS\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\uff61<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>function copyMoveFile() {\n  \/\/\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff08\u30d5\u30a9\u30eb\u30c0ID\u3092\u5165\u529b\uff09\n  var source_dat = DriveApp.getFolderById(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;);\n\n  \/\/\u4fdd\u5b58\u3059\u308b\u5834\u6240\uff08\u30d5\u30a9\u30eb\u30c0ID\u3092\u5165\u529b\uff09\n  var copy_dir = DriveApp.getFolderById(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;);\n\n  var files = source_dat.getFiles();\n\n  while (files.hasNext()) {\n    var file = files.next();\n    var f = file.makeCopy(file.getName(), copy_dir);\n    if (file.getMimeType() == MimeType.GOOGLE_APPS_SCRIPT) {\n      Drive.Files.update({ parents: [{ id: copy_dir }] }, f.getId());\n    }\n  }\n}<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2021\/01\/2021-01-08_18h49_45.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d5\u30a9\u30eb\u30c0\u5185\u3092\u307e\u3068\u3081\u3066\u5909\u63db\u3059\u308b\u65b9\u6cd5\u306f\u3053\u3061\u3089\u3067\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\/2020\/04\/eyecatch-google-apps-script-convert-spreadsheet-300x169.png\" 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-batch-convert-google-format\/\">Google\u30c9\u30e9\u30a4\u30d6\u2502\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u307e\u3068\u3081\u3066\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u30fb\u30b9\u30e9\u30a4\u30c9\u30fb\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u81ea\u52d5\u5909\u63db\u3059&#8230;<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google\u30c9\u30e9\u30a4\u30d6\u5185\u306b\u5171\u6709\u3055\u308c\u305f .xlsx \u3084 .csv\u3001.pptx \u306a\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u3001\u6bce\u56de\u624b\u52d5\u3067 Google \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3084\u30b9\u30e9\u30a4\u30c9\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u305b\u3093\u304b\uff1f \u5c11\u91cf\u306a\u3089\u307e\u3060\u3057\u3082\u3001\u30d5\u30a1&#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<p class=\"wp-block-paragraph\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u307b\u304b\u306e\u64cd\u4f5c\u306f\u3001\u307e\u3068\u3081\u304b\u3089\u3054\u89a7\u3044\u305f\u3060\u3051\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\u30b5\u30fc\u30d3\u30b9\u306b\u3064\u3044\u3066\u66f8\u3044\u305f\u8a18\u4e8b\u3092\u3001\u30b5\u30fc\u30d3\u30b9\u5225\u306b\u5206\u985e\u3057\u307e\u3057\u305f\u3002 \u624b\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3057\u305f\u3044\u5834\u5408\u306f\u3001GAS\u3092\u6271\u3063\u305f\u8a18\u4e8b\u3082\u3042\u308f\u305b\u3066\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 \u5404\u30ab\u30c6\u30b4\u30ea\u30fc\u306f\u95b2\u89a7\u6570\u306e\u591a&#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<p class=\"wp-block-paragraph\">\u53e4\u3044\u7248\u3092\u524a\u9664\u3059\u308b\u65b9\u6cd5\u306f\u3053\u3061\u3089\u3067\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-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\u3067\u540c\u3058\u7a2e\u985e\u3067\u540c\u3058\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u4e0a\u66f8\u304d\u3055\u308c\u307e\u3059\u304c\uff64\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3055\u308c\u3066\u53e4\u3044\u30c7\u30fc\u30bf\u3082\u6b8b\u3063\u305f\u307e\u307e\u306b\u306a\u308a\u307e\u3059\uff61 \u975e\u5e38\u306b\u4fbf\u5229\u306a\u306e\u3067\u3059\u304c\uff64&#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\">\u307e\u3068\u3081<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Google\u30c9\u30e9\u30a4\u30d6\u306b\u30d5\u30a9\u30eb\u30c0\u3092\u30b3\u30d4\u30fc\u3059\u308b\u6a5f\u80fd\u306f\u306a\u3044<\/strong>\u3002\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u300c\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u300d\u3067\u304d\u308b<\/li>\n\n\n\n<li>\u624b\u4f5c\u696d\u306a\u3089\u3001\u4e2d\u8eab\u3092\u5168\u90e8\u9078\u3093\u3067\u30b3\u30d4\u30fc\u3057\u3001\u65b0\u3057\u3044\u30d5\u30a9\u30eb\u30c0\u3078\u79fb\u3059<\/li>\n\n\n\n<li><strong>\u305d\u306e\u65b9\u6cd5\u3067\u306f\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u306f\u8907\u88fd\u3055\u308c\u306a\u3044<\/strong><\/li>\n\n\n\n<li>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u4e0a\u3052\u76f4\u3059\u3068<strong>Google\u5f62\u5f0f\u304cOffice\u5f62\u5f0f\u306b\u5909\u308f\u308b<\/strong>\u306e\u3067\u907f\u3051\u308b<\/li>\n\n\n\n<li>\u958b\u304f\u5834\u6240\u3092\u5897\u3084\u3057\u305f\u3044\u3060\u3051\u306a\u3089\u300c\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4f5c\u6210\u300d\u3067\u8db3\u308a\u308b<\/li>\n\n\n\n<li>\u968e\u5c64\u3054\u3068\u8907\u88fd\u3059\u308b\u306a\u3089<strong>GAS<\/strong>\u304c\u78ba\u5b9f<\/li>\n<\/ul>\n\n","protected":false},"excerpt":{"rendered":"<p>Google\u30c9\u30e9\u30a4\u30d6\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u4e38\u3054\u3068\u30b3\u30d4\u30fc\u3057\u3088\u3046\u3068\u3057\u3066\u3001\u30e1\u30cb\u30e5\u30fc\u306b\u898b\u5f53\u305f\u3089\u305a\u6238\u60d1\u3063\u305f\u65b9\u306f\u591a\u3044\u306f\u305a\u3067\u3059\u3002 Google\u30c9\u30e9\u30a4\u30d6\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306f\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u304c\u3001\u30d5\u30a9\u30eb\u30c0\u306f\u30b3\u30d4\u30fc\u3067\u304d\u307e\u305b\u3093\u3002 \u4ed5\u69d8\u306a\u306e\u3067\u3001\u63a2\u3057\u3066\u3082\u51fa\u3066\u304d\u307e\u305b\u3093 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":22866,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pochipp_cv_data":"","swell_btn_cv_data":"","book_review_data":"","footnotes":"","ssp_meta_title":"Google\u30c9\u30e9\u30a4\u30d6\u3067\u30d5\u30a9\u30eb\u30c0\u3092\u30b3\u30d4\u30fc\u3059\u308b5\u3064\u306e\u65b9\u6cd5","ssp_meta_description":"Google\u30c9\u30e9\u30a4\u30d6\u306f\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u304c\u3001\u30d5\u30a9\u30eb\u30c0\u3092\u30b3\u30d4\u30fc\u3059\u308b\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4e2d\u8eab\u3092\u307e\u3068\u3081\u3066\u8907\u88fd\u3059\u308b\u624b\u9806\u3001\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u304c\u8907\u88fd\u3055\u308c\u306a\u3044\u554f\u984c\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5165\u308c\u76f4\u3059\u3068Google\u5f62\u5f0f\u304cOffice\u5f62\u5f0f\u306b\u5909\u308f\u308b\u70b9\u3001\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u8db3\u308a\u308b\u5834\u5408\u3001\u968e\u5c64\u3054\u3068\u8907\u88fd\u3059\u308bGAS\u307e\u3067\u307e\u3068\u3081\u307e\u3057\u305f\u3002"},"categories":[19],"tags":[18,9],"class_list":["post-19463","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-drive","tag-gas","tag-free"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/19463","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=19463"}],"version-history":[{"count":7,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/19463\/revisions"}],"predecessor-version":[{"id":23173,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/19463\/revisions\/23173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/media\/22866"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/media?parent=19463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/categories?post=19463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/tags?post=19463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}