<?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: Open Multiple .txt Files based on date in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656131#M1027337</link>
    <description>&lt;P&gt;I put this together in just a couple hours so it is a little messy. But it's the main idea for the data saving VI. From here I would like the Data Open VI to take the date here I changed it to %j for testing but %d%m%Y is what that normally is. Again thanks for looking into this.&amp;nbsp;&lt;IMG src="https://ip1.i.lithium.com/6337bdba4afe9b7ec13fbe98d5637c77e6f3e3fb/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32303639323969314333443830333745324241393243422f696d6167652d73697a652f6f726967696e616c3f763d312e302670783d2d31" border="0" alt="Data Save.png" title="Data Save.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2017 20:53:08 GMT</pubDate>
    <dc:creator>AUengineer</dc:creator>
    <dc:date>2017-07-06T20:53:08Z</dc:date>
    <item>
      <title>Open Multiple .txt Files based on date</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656119#M1027335</link>
      <description>&lt;P&gt;I am attempting to build a VI&amp;nbsp;that opens the last 5 production days of data in order to create a "real time" history graph that compares each day.&lt;/P&gt;
&lt;P&gt;Production days are Monday 7 am through Saturday 7 am. Shifts are 1= 7-3, 2= 3-11, and 3=11-7.&lt;/P&gt;
&lt;P&gt;I already built a VI that saves a shifts worth of OEE/Production values into a .txt file with a date and what shift it was. Example: dd/mm/yyyy_shift#.txt &amp;nbsp;(I am open to changing that format).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like this VI to open all of the files for the previous 5 production days. I am having issues such as weekends or days when no production was planned (no file exists for that day).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 20:43:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656119#M1027335</guid>
      <dc:creator>AUengineer</dc:creator>
      <dc:date>2017-07-06T20:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Open Multiple .txt Files based on date</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656131#M1027337</link>
      <description>&lt;P&gt;I put this together in just a couple hours so it is a little messy. But it's the main idea for the data saving VI. From here I would like the Data Open VI to take the date here I changed it to %j for testing but %d%m%Y is what that normally is. Again thanks for looking into this.&amp;nbsp;&lt;IMG src="https://ip1.i.lithium.com/6337bdba4afe9b7ec13fbe98d5637c77e6f3e3fb/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32303639323969314333443830333745324241393243422f696d6167652d73697a652f6f726967696e616c3f763d312e302670783d2d31" border="0" alt="Data Save.png" title="Data Save.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 20:53:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656131#M1027337</guid>
      <dc:creator>AUengineer</dc:creator>
      <dc:date>2017-07-06T20:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Open Multiple .txt Files based on date</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656133#M1027338</link>
      <description>&lt;P&gt;Hi engineer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;I am having issues such as weekends or days when no production was planned (no file exists for that day).&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;What kind of issues?&lt;/P&gt;
&lt;P&gt;When you know it is a weekend you only need to choose the next day. And you need to handle errors if the FileOpen function outputs them…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other option:&lt;/P&gt;
&lt;P&gt;Use ListFolder to get a list of all files fitting to your filename convention. Then parse the filenames and choose those ones fitting your "5 last days" requirement…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;dd/mm/yyyy_shift#.txt &amp;nbsp;(I am open to changing that format).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I recommend not to put slashes in filenames. I also recommend to format the date like YYYYMMDD for easier sorting of the files…&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 20:58:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656133#M1027338</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2017-07-06T20:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Open Multiple .txt Files based on date</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656154#M1027342</link>
      <description>&lt;P&gt;Hi Cory,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have your list of files, you want the 5 most recent days. What I would do, is keep an array of the most recent days, and once you try to add the 6th one, stop looking through files. This assumes your array is sorted. I use a filename format like "YYYYMMDD_Filename.txt" most of the time, so that windows can easily organize by date. Here is an example to get you going:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/6b038a8fc767cba4a1e8909622ead3f87d83fd48/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32303639333769414436463739394433314442444435372f696d6167652d73697a652f6f726967696e616c3f763d312e302670783d2d31" border="0" alt="Temp2.PNG" title="Temp2.PNG" /&gt;&lt;IMG src="https://ip1.i.lithium.com/8e741bbbe821eb4f53d72426f312911ea5bfe53c/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32303639333869353045384239463433453945304134442f696d6167652d73697a652f6f726967696e616c3f763d312e302670783d2d31" border="0" alt="Temp3.PNG" title="Temp3.PNG" /&gt;&lt;IMG src="https://ip1.i.lithium.com/e02162e4422bf2317950234d9e891d7e2f45089e/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32303639333969464243313236343632433234374335332f696d6167652d73697a652f6f726967696e616c3f763d312e302670783d2d31" border="0" alt="Temp4.PNG" title="Temp4.PNG" /&gt;&lt;IMG src="https://ip1.i.lithium.com/35e99077cb466355857477819c1723ae820e9518/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32303639343069373131353741384230424644383845342f696d6167652d73697a652f6f726967696e616c3f763d312e302670783d2d31" border="0" alt="Temp1.PNG" title="Temp1.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 21:19:13 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656154#M1027342</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2017-07-06T21:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Open Multiple .txt Files based on date</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656575#M1027432</link>
      <description>&lt;P&gt;Hey Gregoryj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for start on the file system. I do not want to manually input the file names of the most recent days. What would be a way to implement an array of saved files? I tried making that in the Data Save VI, but again I come across the issue of defining the previous 5 production days and whether or not all shifts were producing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cory&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 14:18:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656575#M1027432</guid>
      <dc:creator>AUengineer</dc:creator>
      <dc:date>2017-07-07T14:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Open Multiple .txt Files based on date</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656602#M1027436</link>
      <description>&lt;P&gt;Look for the List Folder function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 14:36:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Open-Multiple-txt-Files-based-on-date/m-p/3656602#M1027436</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2017-07-07T14:36:45Z</dc:date>
    </item>
  </channel>
</rss>

