<?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 Moving the files based on file pattern in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371038#M134017</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want create job below logoc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIRST RUN.&lt;/P&gt;
&lt;P&gt;1) One common directory(i.e C:/Landing)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;files in C:/Landing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AAA_2017_0610_024629&lt;BR /&gt;AAA_2017_0611_024623&lt;BR /&gt;AAA_2017_0612_024622&lt;BR /&gt;BBB_2017_0612_024300&lt;BR /&gt;CCC_2017_0612_024300&lt;/P&gt;
&lt;P&gt;2) Move the files to specific directory based on starting pattern. like AAA, BBB and CCC.&lt;/P&gt;
&lt;P&gt;Move C:/Landing to C:/AAA&lt;BR /&gt;Move C:/Landing to C:/BBB&lt;BR /&gt;Move C:/Landing to C:/CCC&lt;/P&gt;
&lt;P&gt;Note:&lt;BR /&gt;1) Move one file at time to specific directory(Like AAA) for each run.(i will secedule job every 5 mins).&lt;BR /&gt;2) Once file is moved to specific direcory delete the files from C:/Landing directory.&lt;BR /&gt;3) Move is done based old dates not latest date. ex: move files 10th , 11th and 12th date order.(NOTE: move one file at time for each run).&lt;/P&gt;
&lt;P&gt;Second RUN.&lt;/P&gt;
&lt;P&gt;same process, only it will move next file if mutiple file exist based on dates.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;fisrt run:&lt;BR /&gt;move AAA_2017_0610_024629 to c:/AAA&lt;BR /&gt;move BBB_2017_0612_024300 to c:/BBB&lt;BR /&gt;move CCC_2017_0612_024300 to c:/CCC&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;second run:&lt;BR /&gt;AAA_2017_0611_024623 to C:/AAA&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly help on above scanario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Shree&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 12:48:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-05T12:48:57Z</dc:date>
    <item>
      <title>Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371038#M134017</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want create job below logoc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIRST RUN.&lt;/P&gt;
&lt;P&gt;1) One common directory(i.e C:/Landing)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;files in C:/Landing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AAA_2017_0610_024629&lt;BR /&gt;AAA_2017_0611_024623&lt;BR /&gt;AAA_2017_0612_024622&lt;BR /&gt;BBB_2017_0612_024300&lt;BR /&gt;CCC_2017_0612_024300&lt;/P&gt;
&lt;P&gt;2) Move the files to specific directory based on starting pattern. like AAA, BBB and CCC.&lt;/P&gt;
&lt;P&gt;Move C:/Landing to C:/AAA&lt;BR /&gt;Move C:/Landing to C:/BBB&lt;BR /&gt;Move C:/Landing to C:/CCC&lt;/P&gt;
&lt;P&gt;Note:&lt;BR /&gt;1) Move one file at time to specific directory(Like AAA) for each run.(i will secedule job every 5 mins).&lt;BR /&gt;2) Once file is moved to specific direcory delete the files from C:/Landing directory.&lt;BR /&gt;3) Move is done based old dates not latest date. ex: move files 10th , 11th and 12th date order.(NOTE: move one file at time for each run).&lt;/P&gt;
&lt;P&gt;Second RUN.&lt;/P&gt;
&lt;P&gt;same process, only it will move next file if mutiple file exist based on dates.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;fisrt run:&lt;BR /&gt;move AAA_2017_0610_024629 to c:/AAA&lt;BR /&gt;move BBB_2017_0612_024300 to c:/BBB&lt;BR /&gt;move CCC_2017_0612_024300 to c:/CCC&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;second run:&lt;BR /&gt;AAA_2017_0611_024623 to C:/AAA&lt;/P&gt;
&lt;P&gt;etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly help on above scanario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Shree&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 12:48:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371038#M134017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T12:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371039#M134018</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LM8oAAG"&gt;@bshree88&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You need to stop calling your questions "scanario". You need to give a decent description so that other people can make use of the answers you get. You have also asked for someone to tell you how to create the whole job again. If you are new to Talend, that is great. But you (or your company) need to give yourself time to learn the product, since it looks like you are trying to deliver functionality to either your company or a client by asking us to do it for you. That is not really good for you, us or Talend.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;However, I have a job that kind of does most of this and I have quickly changed it to cover most of your requirements. You will need to tweak it to cover all of your requirements. This is a very simple job and simply uses the Java substring method to get the folder name and then uses a tFileCopy to copy and delete the file. The tFileList is used to monitor the folder and you can set the tFileList to do this in a particular order.....I have not done that.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You will need Talend v621+ to use this job&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lr89"&gt;FileMove.zip&lt;/A&gt;</description>
      <pubDate>Thu, 05 Oct 2017 13:10:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371039#M134018</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T13:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371040#M134019</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, i will take care your inputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I am learning and delivering the functionality. i am trying my side as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks once again for direction with others points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;shridhar&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 13:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371040#M134019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T13:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371041#M134020</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have getting error. Please find the attached file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you using any routines here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shree&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrDD"&gt;error.PNG&lt;/A&gt;</description>
      <pubDate>Thu, 05 Oct 2017 13:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371041#M134020</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T13:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371042#M134021</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got where is a issue, the issue with jvm and talend version. i have created same job in talend version 6.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's working fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;shree&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 13:36:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371042#M134021</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T13:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371043#M134022</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As per jobs. below points are my conversations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) It's moving all files for single run if multiple files with same pattern.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ex:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AAA_2017_0610_024629&lt;BR /&gt;AAA_2017_0611_024623&lt;/P&gt;
&lt;P&gt;2) In requirement, creation of destination folders is not based on patter, it could be C:/AAA or C:/test/files etc.&lt;/P&gt;
&lt;P&gt;3) Need to move single file for single run if only if multiple file have same patter.(in order)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly give me idea/suggestion. i will work around.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time and support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Shree&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 05:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371043#M134022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-06T05:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371044#M134023</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LM8oAAG"&gt;@bshree88&lt;/A&gt;&amp;nbsp;the job is set to look at the pattern at the start of the filename, create a folder situated on the C:\ drive (if the folder does not exist), and adds the file to that folder.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Your initial question seemed to suggest that the pattern dictated the folder the file would be in? Has this changed? If you are talking about the path of the folder, you can edit the job using a context variable which can be changed quite easily. But the pattern at the front of the file must match the folder, or how do you know where the file goes?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The job will&amp;nbsp;move every file in the input folder. Why would you want to limit it to one file at a time? This can be done, and would require just taking the first file returned by the tFileList (which can be set to find files in date order). An easy way of doing this is to store the files found n memory and only use the first file. There are other ways.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 12:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371044#M134023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-06T12:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371045#M134024</link>
      <description>&lt;P&gt;The reason my job failed is that I have the implicit context load set for my project. There are parameters set which will not work on your machine. Just switch off the implicit context variables in your job settings.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 12:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371045#M134024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-06T12:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371046#M134025</link>
      <description>&lt;P&gt;Sure Richard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shree&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 04:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371046#M134025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T04:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371047#M134026</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find the below are my answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your initial question seemed to suggest that the pattern dictated the folder the file would be in? Has this changed? If you are talking about the path of the folder, you can edit the job using a context variable which can be changed quite easily. But the pattern at the front of the file must match the folder, or how do you know where the file goes?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Ans&lt;/STRONG&gt;: Destination&amp;nbsp;folder&amp;nbsp;is anything. only i want to move the files based on patter to any destination folder(Not specific).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The job will&amp;nbsp;move every file in the input folder. Why would you want to limit it to one file at a time? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Ans&lt;/STRONG&gt;: Reason is i want to process old date file first to new date files one by one(Each run). need to run every 10 min(frequency&amp;nbsp;is depends).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This can be done, and would require just taking the first file returned by the tFileList (which can be set to find files in date order). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ans: But i want to set based file date and date is coming with file name. i want to substring the date order by date, pick old date and move to destination folder.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;An easy way of doing this is to store the files found n memory and only use the first file. &lt;/SPAN&gt;There are other ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ans: How to achive 3rd one. storing in meory and move&amp;nbsp; single old date file to destination folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thaks for your inputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PFA my job which created. i am facing how to move single file to destination if mutiple file exist with same pattern based on file dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Shree&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrE6"&gt;Job_design_5.PNG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lr7V"&gt;Job_design_1.PNG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lr2E"&gt;Job_design_2.PNG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrEC"&gt;Job_design_3_tjava_code.PNG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrEG"&gt;Job_design_4.PNG&lt;/A&gt;</description>
      <pubDate>Mon, 09 Oct 2017 05:05:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371047#M134026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T05:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371048#M134027</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/0053p000007LM8oAAG"&gt;@bshree88&lt;/A&gt; wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Hi Richard,&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;Please find the below are my answer.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;Your initial question seemed to suggest that the pattern dictated the folder the file would be in? Has this changed? If you are talking about the path of the folder, you can edit the job using a context variable which can be changed quite easily. But the pattern at the front of the file must match the folder, or how do you know where the file goes?&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Ans&lt;/STRONG&gt;: Destination&amp;nbsp;folder&amp;nbsp;is anything. only i want to move the files based on patter to any destination folder(Not specific).&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;OK, this can be achieved using a Context variable as the base destination folder rather than hard coding it. You can set the Context variable at runtime.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;The job will&amp;nbsp;move every file in the input folder. Why would you want to limit it to one file at a time? &lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Ans&lt;/STRONG&gt;: Reason is i want to process old date file first to new date files one by one(Each run). need to run every 10 min(frequency&amp;nbsp;is depends).&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;FONT color="#0000FF"&gt;I see. If you load your tFileList values using an iterate to a tFixedFlowInput, you can then store them in a tHashOutput component (Google this if you are not sure). You can then use a bit of Java to get the date from the file and then order by the date. Then it is just a case of using only the first record.&lt;/FONT&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;This can be done, and would require just taking the first file returned by the tFileList (which can be set to find files in date order). &lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;Ans: But i want to set based file date and date is coming with file name. i want to substring the date order by date, pick old date and move to destination folder.&lt;/SPAN&gt;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;SPAN&gt;An easy way of doing this is to store the files found n memory and only use the first file. &lt;/SPAN&gt;There are other ways.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;Ans: How to achive 3rd one. storing in meory and move&amp;nbsp; single old date file to destination folder.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;Thaks for your inputs.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;PFA my job which created. i am facing how to move single file to destination if mutiple file exist with same pattern based on file dates.&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&lt;FONT color="#0000FF"&gt;I am not entirely sure what you mean here. Are you saying that files have the same date and the same folder path pattern? If so, you need to find another way of sorting (an additional way to just date) and do the same as described above.&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;Regards&lt;/P&gt; 
 &lt;P&gt;Shree&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 08:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371048#M134027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T08:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371049#M134028</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find the below are my answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your initial question seemed to suggest that the pattern dictated the folder the file would be in? Has this changed? If you are talking about the path of the folder, you can edit the job using a context variable which can be changed quite easily. But the pattern at the front of the file must match the folder, or how do you know where the file goes?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Ans&lt;/STRONG&gt;: Destination&amp;nbsp;folder&amp;nbsp;is anything. only i want to move the files based on patter to any destination folder(Not specific).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;OK, this can be achieved using a Context variable as the base destination folder rather than hard coding it. You can set the Context variable at runtime.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#99CC00"&gt;Fine&lt;/FONT&gt;..&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The job will&amp;nbsp;move every file in the input folder. Why would you want to limit it to one file at a time?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Ans&lt;/STRONG&gt;: Reason is i want to process old date file first to new date files one by one(Each run). need to run every 10 min(frequency&amp;nbsp;is depends).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I see. If you load your tFileList values using an iterate to a tFixedFlowInput, you can then store them in a tHashOutput component (Google this if you are not sure). You can then use a bit of Java to get the date from the file and then order by the date. Then it is just a case of using only the first record.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Fine..&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This can be done, and would require just taking the first file returned by the tFileList (which can be set to find files in date order).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ans: But i want to set based file date and date is coming with file name. i want to substring the date order by date, pick old date and move to destination folder.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;An easy way of doing this is to store the files found n memory and only use the first file.&amp;nbsp;&lt;/SPAN&gt;There are other ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ans: How to achive 3rd one. storing in meory and move&amp;nbsp; single old date file to destination folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thaks for your inputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PFA my job which created. i am facing how to move single file to destination if mutiple file exist with same pattern based on file dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I am not entirely sure what you mean here. Are you saying that files have the same date and the same folder path pattern? If so, you need to find another way of sorting (an additional way to just date) and do the same as described above.&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here, Below&amp;nbsp; is example same if&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if files start with AAA move to C:/TEST/ and that only one file, after move replace from source direcctory. ie.&amp;nbsp;&lt;SPAN&gt;AAA_2017_0612_024622(old date)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AAA_2017_0610_024629&lt;BR /&gt;AAA_2017_0611_024623&lt;BR /&gt;&lt;FONT color="#99CC00"&gt;AAA_2017_0612_024622&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;work on as mentison above points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Shree&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 06:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371049#M134028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-10T06:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Moving the files based on file pattern</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371050#M134029</link>
      <description>&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please re-share the sample job link. It will be a great help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TA&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 16:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Moving-the-files-based-on-file-pattern/m-p/2371050#M134029</guid>
      <dc:creator>Tasfiahm</dc:creator>
      <dc:date>2020-07-14T16:53:01Z</dc:date>
    </item>
  </channel>
</rss>

