<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>DriveAPI on tanaike - Google Apps Script, Gemini API, and Developer Tips</title>
    <link>https://tanaikech.github.io/tags/driveapi/</link>
    <description>Recent content in DriveAPI on tanaike - Google Apps Script, Gemini API, and Developer Tips</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <copyright>&amp;copy; 2026. All rights reserved.</copyright>
    <lastBuildDate>Fri, 05 Jan 2018 16:48:25 +0900</lastBuildDate>
    <atom:link href="https://tanaikech.github.io/tags/driveapi/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Which of Drive API v2 or v3 is used for DriveApp.searchFiles()</title>
      <link>https://tanaikech.github.io/2018/01/05/which-of-drive-api-v2-or-v3-is-used-for-driveapp.searchfiles/</link>
      <pubDate>Fri, 05 Jan 2018 16:48:25 +0900</pubDate>
      <guid>https://tanaikech.github.io/2018/01/05/which-of-drive-api-v2-or-v3-is-used-for-driveapp.searchfiles/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/242f644026837dd071f0ce95b2fd107a&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;experiment&#34;&gt;Experiment&lt;/h2&gt;&#xA;&lt;p&gt;It has investigated the differences between the documents of &amp;ldquo;Search for Files&amp;rdquo; for v2 and v3. The following table shows the comparison of v2 and v3 for &amp;ldquo;Valid fields for files.list&amp;rdquo;. The column of &lt;code&gt;DriveApp.searchFiles()&lt;/code&gt; means whether the query can be used for &lt;code&gt;DriveApp.searchFiles()&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;v2&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;v3&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: center&#34;&gt;Difference&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: center&#34;&gt;DriveApp.searchFiles()&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;title&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;name&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;different&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;v2: succeed, v3: fail&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;fullText&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;fullText&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;mimeType&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;mimeType&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;modifiedDate&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;modifiedTime&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;lastViewedByMeDate&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;viewedByMeTime&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;different&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;v2: succeed, v3: fail&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;trashed&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;trashed&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;starred&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;starred&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;parents&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;parents&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;owners&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;owners&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;writers&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;writers&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;readers&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;readers&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;sharedWithMe&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;sharedWithMe&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;properties&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;properties&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;properties with visibility=&amp;lsquo;PRIVATE&amp;rsquo;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;appProperties&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;different&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;v2: succeed, v3: fail&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;visibility&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;visibility&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;same&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: center&#34;&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;result&#34;&gt;Result&lt;/h2&gt;&#xA;&lt;p&gt;As the result, it is considered that &lt;code&gt;DriveApp.searchFiles()&lt;/code&gt; is used as Drive API v2 yet.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Retrieving Files with Filename Included Special Characters using Google Apps Script</title>
      <link>https://tanaikech.github.io/2017/09/07/retrieving-files-with-filename-included-special-characters-using-google-apps-script/</link>
      <pubDate>Thu, 07 Sep 2017 10:40:13 +0900</pubDate>
      <guid>https://tanaikech.github.io/2017/09/07/retrieving-files-with-filename-included-special-characters-using-google-apps-script/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gist.github.com/tanaikech/e74ead2537b7b3718fc824b6ca60a531&#34;&gt;Gists&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This sample script is for retrieving files with filename included special characters using Google Apps Script. The files are used on Google Drive.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The files with filename of special characters cannot be retrieved using &lt;code&gt;DriveApp.getFilesByName()&lt;/code&gt;. This workaround solved this.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;As a query parameter, &lt;code&gt;name contains &#39;filename with special characters&#39;&lt;/code&gt; is used. This &lt;code&gt;contains&lt;/code&gt; is very important. &lt;code&gt;name=&#39;filename with special characters&#39;&lt;/code&gt; cannot retrieve such files. Today, it was found that &lt;code&gt;name contains &#39;filename with special characters&#39;&lt;/code&gt; is the workaround. I have been looking for this workaround for a while. Finally, I found this today. By using this method, filename included umlauts can be also retrieved.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
