<?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>question Re: does listsftp anf fetchsftp stores the directory structure? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/does-listsftp-anf-fetchsftp-stores-the-directory-structure/m-p/182088#M70849</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/20255/dheeruksingh.html" nodeid="20255"&gt;@dhieru singh&lt;/A&gt;&lt;P&gt;You can get directory structure from &lt;STRONG&gt;path attribute&lt;/STRONG&gt; associated with the flow file,&lt;/P&gt;&lt;PRE&gt;path //The fully qualified name of the directory on the SFTP Server from which the file was pulled.&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Filename&lt;/STRONG&gt; attribute will give you the actual file name that got pulled from the directory&lt;/P&gt;&lt;PRE&gt;filename //The name of the file on the SFTP Server&lt;/PRE&gt;&lt;P&gt;in &lt;STRONG&gt;Fetchsftp&lt;/STRONG&gt; processor we are going to use&lt;/P&gt;&lt;PRE&gt;${path}/${filename} //to fetch the actual file this expression will give directory and also file path.  &lt;/PRE&gt;&lt;P&gt;if you give top level directory and &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recurse Subdirectories property to true&lt;/STRONG&gt; the processor will &lt;STRONG&gt;navigate through all the subdirectories &lt;/STRONG&gt;are in that &lt;STRONG&gt;top level directory&lt;/STRONG&gt;(if nifi having access to those sub directories) and &lt;STRONG&gt;list all the files in those sub directories&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Each &lt;STRONG&gt;flowfile will have path,filename &lt;/STRONG&gt;attribute as &lt;STRONG&gt;path attribute&lt;/STRONG&gt; gives you from&lt;STRONG&gt; which directory the file got pulled from&lt;/STRONG&gt; and &lt;STRONG&gt;filename attribute&lt;/STRONG&gt; gives you&lt;STRONG&gt; actual filename&lt;/STRONG&gt; of the file. &lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 07:39:19 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2017-11-07T07:39:19Z</dc:date>
    <item>
      <title>does listsftp anf fetchsftp stores the directory structure?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/does-listsftp-anf-fetchsftp-stores-the-directory-structure/m-p/182087#M70848</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Thanks a lot to this awesome community.&lt;/P&gt;&lt;P&gt;I am trying to replicate a directory structure from where I am listing and fetching the files using list and fetchsftp&lt;/P&gt;&lt;P&gt;I did a PoC and I can see it stores the filename but not sure if it can store the directory structure if I give the top level direcotry to list.&lt;/P&gt;&lt;P&gt;Any suggestion or help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 06:30:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/does-listsftp-anf-fetchsftp-stores-the-directory-structure/m-p/182087#M70848</guid>
      <dc:creator>dhieru</dc:creator>
      <dc:date>2017-11-07T06:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: does listsftp anf fetchsftp stores the directory structure?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/does-listsftp-anf-fetchsftp-stores-the-directory-structure/m-p/182088#M70849</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/20255/dheeruksingh.html" nodeid="20255"&gt;@dhieru singh&lt;/A&gt;&lt;P&gt;You can get directory structure from &lt;STRONG&gt;path attribute&lt;/STRONG&gt; associated with the flow file,&lt;/P&gt;&lt;PRE&gt;path //The fully qualified name of the directory on the SFTP Server from which the file was pulled.&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Filename&lt;/STRONG&gt; attribute will give you the actual file name that got pulled from the directory&lt;/P&gt;&lt;PRE&gt;filename //The name of the file on the SFTP Server&lt;/PRE&gt;&lt;P&gt;in &lt;STRONG&gt;Fetchsftp&lt;/STRONG&gt; processor we are going to use&lt;/P&gt;&lt;PRE&gt;${path}/${filename} //to fetch the actual file this expression will give directory and also file path.  &lt;/PRE&gt;&lt;P&gt;if you give top level directory and &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recurse Subdirectories property to true&lt;/STRONG&gt; the processor will &lt;STRONG&gt;navigate through all the subdirectories &lt;/STRONG&gt;are in that &lt;STRONG&gt;top level directory&lt;/STRONG&gt;(if nifi having access to those sub directories) and &lt;STRONG&gt;list all the files in those sub directories&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Each &lt;STRONG&gt;flowfile will have path,filename &lt;/STRONG&gt;attribute as &lt;STRONG&gt;path attribute&lt;/STRONG&gt; gives you from&lt;STRONG&gt; which directory the file got pulled from&lt;/STRONG&gt; and &lt;STRONG&gt;filename attribute&lt;/STRONG&gt; gives you&lt;STRONG&gt; actual filename&lt;/STRONG&gt; of the file. &lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 07:39:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/does-listsftp-anf-fetchsftp-stores-the-directory-structure/m-p/182088#M70849</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2017-11-07T07:39:19Z</dc:date>
    </item>
  </channel>
</rss>

