Google Apps Script googleドライブ内のファイルの説明を取得する

環境
Google Chrome 111.0.5563.66(Official Build) (64 ビット)
Windows 10 Home 64bit

構文
file変数名.getDescription()
getDescription関数を使ってファイルの説明を取得します。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function myFunction() {
// ファイルidからファイルを取得
let file = DriveApp.getFileById('2DotPMUaGJb4OmTTGMfKF-VurhNiBPJX43oYDJqQ5Cqo');
console.log( file.getDescription() );
}
function myFunction() { // ファイルidからファイルを取得 let file = DriveApp.getFileById('2DotPMUaGJb4OmTTGMfKF-VurhNiBPJX43oYDJqQ5Cqo'); console.log( file.getDescription() ); }
function myFunction() {
   // ファイルidからファイルを取得
  let file = DriveApp.getFileById('2DotPMUaGJb4OmTTGMfKF-VurhNiBPJX43oYDJqQ5Cqo');  

  console.log( file.getDescription() );
}

 

Google Apps Script

Posted by arkgame