【GAS】ファイル 名でGoogleドライブ内のファイルを検索して対象のファイル IDを取得する
GAS

タイトル通りファイル名でドライブを検索して、対象ファイルが存在していたらfileIDを返す処理
function searchFile(driveId, FileName) {
const fileList = DriveApp.getFolderById(driveId).getFiles();
while (fileList.hasNext()) {
const file = fileList.next();
if (FileName === file.getName()) {
this

