Skip to content

Instantly share code, notes, and snippets.

View ttsukagoshi's full-sized avatar

TSUKAGOSHI Taro ttsukagoshi

View GitHub Profile
@ttsukagoshi
ttsukagoshi / dynamic_choices_for_Google_Form.gs
Last active January 9, 2020 03:08
GoogleフォームにバインドされたGoogle App Script (GAS)。ラジオボタン型の設問に対する選択肢を、一人が選択してフォーム送信したときに、以降の回答者からはその選択肢が見えないようにする。Google Form-bound app script for making a form with dynamic choices, i.e., when one respondent of the form selects a choice in a radio button-type question, that choice is deleted for later respondents.
//元の選択肢。
var originalChoice = [
'Choice1',
'Choice2',
'etc.'
];
// 設定
var numQuestion = 2; // 動的に変化させる質問の番号。配列なので0からカウント。0, 1, 2, ...
var textQuestion = 'Title of Item (form question)'; // 動的に変化させる質問のテキスト
@ttsukagoshi
ttsukagoshi / moveAllFiles.gs
Created December 30, 2019 14:45
Google App Script (Javascript) to move all files in a particular Google Drive folder to another folder
/**
* Function to move all files in a particular Google Drive folder to another folder
* @param {string} moveFromFolderId - the original Google Drive folder ID from which you want to move the files
* @param {string} moveToFolderId - the Google Drive folder ID to which you want to move the files
*/
function moveAllFiles(moveFromFolderId, moveToFolderId) {
var moveFrom = DriveApp.getFolderById(moveFromFolderId);
var moveTo = DriveApp.getFolderById(moveToFolderId);
var files = moveFrom.getFiles();