<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Check if Folder Exists in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414612#M22356</link>
    <description>&lt;P&gt;To check if something exists at a particular path, you can instead use&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_GetMetadataAsync_1.htm" target="_self"&gt;GetMetadataAsync&lt;/A&gt;. It would return the metadata if the item exists, or will raise an exception with &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Files_LookupError_NotFound.htm" target="_self"&gt;LookupError.NotFound&lt;/A&gt; if not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you only want to check for one particular item, that may be easier/faster than looping through the entire parent folder listing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you do use &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderAsync.htm" target="_self"&gt;ListFolderAsync&lt;/A&gt; though, make sure you check the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/P_Dropbox_Api_Files_ListFolderResult_HasMore.htm" target="_self"&gt;ListFolderResult.HasMore&lt;/A&gt; and call back to&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderContinueAsync.htm" target="_self"&gt;ListFolderContinueAsync&lt;/A&gt; if needed.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 18:49:50 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-04-27T18:49:50Z</dc:date>
    <item>
      <title>Check if Folder Exists</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414310#M22349</link>
      <description>&lt;P&gt;Can I do this in my code ?&lt;/P&gt;
&lt;P&gt;Are there any better way ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Public Async Function FolderExists(Client As DropboxClient, Optional Path As String = ("/Apps")) As Task(Of Boolean)
        System.Diagnostics.Debug.WriteLine("--- Checking Folder ---")
        Dim list = Await Client.Files.ListFolderAsync(Path)
        ' show folders then files
        For Each item In list.Entries
            If item.IsFolder And item.Name = ("Fav_Name") Then
                MsgBox("Folder Exists. -&amp;gt;" &amp;amp; item.PathLower)
                Return True
                Exit For
            End If
        Next
        Return False
    End Function&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Apr 2020 05:03:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414310#M22349</guid>
      <dc:creator>evry1falls</dc:creator>
      <dc:date>2020-04-27T05:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Folder Exists</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414612#M22356</link>
      <description>&lt;P&gt;To check if something exists at a particular path, you can instead use&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_GetMetadataAsync_1.htm" target="_self"&gt;GetMetadataAsync&lt;/A&gt;. It would return the metadata if the item exists, or will raise an exception with &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Files_LookupError_NotFound.htm" target="_self"&gt;LookupError.NotFound&lt;/A&gt; if not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you only want to check for one particular item, that may be easier/faster than looping through the entire parent folder listing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you do use &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderAsync.htm" target="_self"&gt;ListFolderAsync&lt;/A&gt; though, make sure you check the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/P_Dropbox_Api_Files_ListFolderResult_HasMore.htm" target="_self"&gt;ListFolderResult.HasMore&lt;/A&gt; and call back to&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderContinueAsync.htm" target="_self"&gt;ListFolderContinueAsync&lt;/A&gt; if needed.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 18:49:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414612#M22356</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-04-27T18:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Folder Exists</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414667#M22362</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;To check if something exists at a particular path, you can instead use&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_GetMetadataAsync_1.htm" target="_self"&gt;GetMetadataAsync&lt;/A&gt;. It would return the metadata if the item exists, or will raise an exception with &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/T_Dropbox_Api_Files_LookupError_NotFound.htm" target="_self"&gt;LookupError.NotFound&lt;/A&gt; if not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you only want to check for one particular item, that may be easier/faster than looping through the entire parent folder listing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that if you do use &lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderAsync.htm" target="_self"&gt;ListFolderAsync&lt;/A&gt; though, make sure you check the&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/P_Dropbox_Api_Files_ListFolderResult_HasMore.htm" target="_self"&gt;ListFolderResult.HasMore&lt;/A&gt; and call back to&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderContinueAsync.htm" target="_self"&gt;ListFolderContinueAsync&lt;/A&gt; if needed.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;100% correct.&lt;/P&gt;&lt;P&gt;I my case, I'm using just one FOLDER to enable users to backup thier Database file of a certain version [Thier version] and when updating thier application version later, the app compairs the offline version with the online version of just One File in just One Folder.&lt;BR /&gt;But I will try&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_GetMetadataAsync_1.htm" target="_self"&gt;GetMetadataAsync&lt;/A&gt;&lt;BR /&gt;and if raises an error [Not found] then I will automatically let the app do [CreateFolderArge] accordingly. What do you think?!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 22:09:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414667#M22362</guid>
      <dc:creator>evry1falls</dc:creator>
      <dc:date>2020-04-27T22:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Folder Exists</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414945#M22384</link>
      <description>&lt;P&gt;Yes, that sounds like a good way to handle the flow of checking for a particular folder and creating it if it doesn't exist.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 14:57:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Check-if-Folder-Exists/m-p/414945#M22384</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-04-28T14:57:09Z</dc:date>
    </item>
  </channel>
</rss>

