<?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 DIR exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782953#M1036869</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;En the script, you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//verify existence of a directory.&lt;/P&gt;&lt;P&gt;if&amp;nbsp; (FileTime('PATH') &amp;gt; 0 ) then&lt;/P&gt;&lt;P&gt;//exist&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;//if not exist.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;EXECUTE cmd.exe /c mkdir PATH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will use the CMD of windows, so you will need the proper permission to the application to this work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Dec 2014 16:42:47 GMT</pubDate>
    <dc:creator>german_avanzato</dc:creator>
    <dc:date>2014-12-23T16:42:47Z</dc:date>
    <item>
      <title>check if DIR exists</title>
      <link>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782952#M1036866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a way i can check if a directory exists, if it doesn't then create it?&lt;/P&gt;&lt;P&gt;I would like this done in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 15:35:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782952#M1036866</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2014-12-23T15:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: check if DIR exists</title>
      <link>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782953#M1036869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;En the script, you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//verify existence of a directory.&lt;/P&gt;&lt;P&gt;if&amp;nbsp; (FileTime('PATH') &amp;gt; 0 ) then&lt;/P&gt;&lt;P&gt;//exist&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;//if not exist.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;EXECUTE cmd.exe /c mkdir PATH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will use the CMD of windows, so you will need the proper permission to the application to this work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 16:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782953#M1036869</guid>
      <dc:creator>german_avanzato</dc:creator>
      <dc:date>2014-12-23T16:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: check if DIR exists</title>
      <link>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782954#M1036870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks. would that make it dynamic though? &lt;/P&gt;&lt;P&gt;currently i have a loop in my script which reads DBF files from multiple directories. &lt;/P&gt;&lt;P&gt;so when QV reads the 1st dir and reads in each DBF i want it to check that there is a folder named 'Processed'. i then want to move the DBF's into the processed folder. &lt;/P&gt;&lt;P&gt;but obviously i can't hardcode a directory into the CMD. &lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 16:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782954#M1036870</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2014-12-23T16:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: check if DIR exists</title>
      <link>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782955#M1036871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can make it dinamic.&lt;/P&gt;&lt;P&gt;You could do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load a Table with the path you want to ceck. This could be done from a .xlxs ,etc&lt;/P&gt;&lt;P&gt;DIRECTORYS:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dirs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dir1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dir2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dir3&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vNroDir= NoOfRows('DIRECTORYS');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 0 to $(vNroDir) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDir = Peek('Dirs',$(i),'DIRECTORYS');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if&amp;nbsp; (FileTime('$(vDir)') &amp;gt; 0 ) then&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;//exist&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;else&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;//if not exist.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;EXECUTE cmd.exe /c mkdir $(vDir)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 18:00:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/check-if-DIR-exists/m-p/782955#M1036871</guid>
      <dc:creator>german_avanzato</dc:creator>
      <dc:date>2014-12-23T18:00:07Z</dc:date>
    </item>
  </channel>
</rss>

