<?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: Search for files in multiples folders AND root paths in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Search-for-files-in-multiples-folders-AND-root-paths/m-p/1810537#M1212566</link>
    <description>&lt;P&gt;I think I would just duplicate the Call statement for each directory of interest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2021 22:57:18 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2021-05-25T22:57:18Z</dc:date>
    <item>
      <title>Search for files in multiples folders AND root paths</title>
      <link>https://community.qlik.com/t5/QlikView/Search-for-files-in-multiples-folders-AND-root-paths/m-p/1810385#M1212547</link>
      <description>&lt;P&gt;Hello Qlik folks,&lt;/P&gt;&lt;P&gt;I'd like to improve my code and there is a summary of my goal :&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the more generic way possible, I'd like to implement in all my apps a way to check files integrity.&lt;/P&gt;&lt;P&gt;My QVDs are in various folders &lt;STRONG&gt;and&lt;/STRONG&gt; various paths&lt;/P&gt;&lt;P&gt;Thanks to the community, I've found help from previous posts to create a function that loop on every folders next to the path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The files I'd like to check are similar to :&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;lib://SERVER1/QVD_Files/MasterData/MD.qvd&lt;/LI&gt;&lt;LI&gt;lib://SERVER1/QVD_Files/inventory.qvd&lt;/LI&gt;&lt;LI&gt;lib://SERVER2/Data/backorders.qvd&lt;/LI&gt;&lt;LI&gt;lib://SERVER3/Sources/forecast.qvd&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My actual code can only loop on a single root (single server) here it is :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub FindFiles (Root)&lt;BR /&gt;&amp;nbsp; For Each File In FileList(&lt;STRONG&gt;Root&amp;amp;'/*'&lt;/STRONG&gt;)&lt;BR /&gt;&amp;nbsp; SET vFile = '$(File)';&lt;BR /&gt;&amp;nbsp; QVD_Files:&lt;BR /&gt;&amp;nbsp; First 1&lt;BR /&gt;&amp;nbsp; Load&lt;BR /&gt;&amp;nbsp; '$(File)' as FileName,&lt;BR /&gt;&amp;nbsp; Subfield('$(File)','/',-1) as QVDName,&lt;BR /&gt;&amp;nbsp; FileTime( '$(File)' ) as QVDFileTime,&lt;BR /&gt;&amp;nbsp; floor(FileTime( '$(File)' )) as FileTimeNum,&lt;BR /&gt;&amp;nbsp; FileSize('$(File)') as FileSize,&lt;BR /&gt;&amp;nbsp; QvdNoOfRecords('$(File)') as FileEntries&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; AutoGenerate 1 ;&lt;BR /&gt;&amp;nbsp; Next File&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;/// Call&amp;nbsp;FindFiles ('lib://SERVER1/QVD_Files/');&lt;/P&gt;&lt;P&gt;/// stuff, check, drop&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What would you do to make this generic and able to loop on several folders from different servers (root) ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks, a lot, for your kind help&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 14:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-for-files-in-multiples-folders-AND-root-paths/m-p/1810385#M1212547</guid>
      <dc:creator>Boulanger</dc:creator>
      <dc:date>2021-05-25T14:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search for files in multiples folders AND root paths</title>
      <link>https://community.qlik.com/t5/QlikView/Search-for-files-in-multiples-folders-AND-root-paths/m-p/1810537#M1212566</link>
      <description>&lt;P&gt;I think I would just duplicate the Call statement for each directory of interest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 22:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-for-files-in-multiples-folders-AND-root-paths/m-p/1810537#M1212566</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-05-25T22:57:18Z</dc:date>
    </item>
  </channel>
</rss>

