<?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: FTP files in all subdirectories in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523353#M23913</link>
    <description>Wendy,&lt;BR /&gt;&lt;BR /&gt;It looks like James didn't quite test his script.  I think after "do" line, you could insert something like:&lt;BR /&gt;&lt;BR /&gt;XDIR=`dirname $X`&lt;BR /&gt;XFILE=`basename $X`&lt;BR /&gt;cd $XDIR&lt;BR /&gt;&lt;BR /&gt;and then change the line:&lt;BR /&gt;&lt;BR /&gt;put $X $X.dup&lt;BR /&gt;&lt;BR /&gt;to &lt;BR /&gt;&lt;BR /&gt;put $XFILE $XFILE.dup&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This script will not duplicate the entire directory tree.&lt;BR /&gt;It will ftp all the files (including the files under subdirectories), but they will all end up in a single directory on your NT system.&lt;BR /&gt;&lt;BR /&gt;If you'd like to duplicate the entire directory tree, you could create a tar archive, then ftp the archive to your NT system and then use Winzip on your NT system.&lt;BR /&gt;The unix part can be made automatic via a script&lt;BR /&gt;(schedule it as a cron job if you wish) - something like this:&lt;BR /&gt;&lt;BR /&gt;cd &lt;PARENT_DIRECTORY&gt;&lt;BR /&gt;tar cvf /tmp/archive.tar &lt;DIRECTORY&gt;&lt;BR /&gt;cd /tmp&lt;BR /&gt;{echo "open &lt;NTHOST&gt; &lt;BR /&gt;user &lt;USERID&gt; &lt;PASSWORD&gt; &lt;BR /&gt;put archive.tar &lt;BR /&gt;close" &lt;BR /&gt;} | ftp -i -n -v &lt;BR /&gt;&lt;/PASSWORD&gt;&lt;/USERID&gt;&lt;/NTHOST&gt;&lt;/DIRECTORY&gt;&lt;/PARENT_DIRECTORY&gt;</description>
    <pubDate>Tue, 01 May 2001 21:25:44 GMT</pubDate>
    <dc:creator>Mladen Despic</dc:creator>
    <dc:date>2001-05-01T21:25:44Z</dc:date>
    <item>
      <title>FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523347#M23907</link>
      <description>How do I automate the FTP so I can get files in a directory, plus files in all subdirectories recursively?&lt;BR /&gt;Any help is greatly appreciated!</description>
      <pubDate>Tue, 01 May 2001 15:05:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523347#M23907</guid>
      <dc:creator>Wendy W. Lou</dc:creator>
      <dc:date>2001-05-01T15:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523348#M23908</link>
      <description>Hi Wendy:&lt;BR /&gt;&lt;BR /&gt;You could do something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;for X in `find /tmp/dummydir -type f`&lt;BR /&gt;do&lt;BR /&gt;  { echo "open thehost&lt;BR /&gt;    user uuu ppp&lt;BR /&gt;    put $X $X.dup&lt;BR /&gt;    close"&lt;BR /&gt;  } | ftp -i -n -v&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 01 May 2001 15:29:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523348#M23908</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-01T15:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523349#M23909</link>
      <description>Theres no simple way to do this with the current ftp program on hp-ux. It is possible, but would involve a complicated script. You would have to do something like ftp to the remote site, do an ls -R - and send this output to a local file, close the ftp connection. Convert the output file from the ls -R into commands for a subsequent ftp connection, one where you cd to each subdir in turn, mget *, then cd to the next dir etc. This would take some time to write and get working correctly.&lt;BR /&gt;&lt;BR /&gt;Far easier to download a different version of ftp from the HP-UX porting centre which will allow recursive ftp of files and subdirectories, eg;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Networking/FTP/ftpcopy-0.3.5/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Networking/FTP/ftpcopy-0.3.5/&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 May 2001 15:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523349#M23909</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-05-01T15:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523350#M23910</link>
      <description>Hi Wendy (again):&lt;BR /&gt;&lt;BR /&gt;Ah...If by "get" you mean "pull" then I agree with Stefan.  I read "get" as "process" and so provided a suggestion to "put" or "push" files!&lt;BR /&gt;&lt;BR /&gt;Regards! :-))&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 01 May 2001 15:36:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523350#M23910</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-01T15:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523351#M23911</link>
      <description>Thanks James and Stefan for your help.&lt;BR /&gt;If I read James' script correctly, it does not read the subdirectories recursively. (Excuse my limited knowledge on scripts.)  I am trying to ftp one directory tree from Unix to NT, hopefully running from NT side.  I am trying to automate this.&lt;BR /&gt;I guess there may not be an easy way to do it (as Stefan indicated).</description>
      <pubDate>Tue, 01 May 2001 19:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523351#M23911</guid>
      <dc:creator>Wendy W. Lou</dc:creator>
      <dc:date>2001-05-01T19:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523352#M23912</link>
      <description>Wendy,&lt;BR /&gt;&lt;BR /&gt;In case you haven't considered:&lt;BR /&gt;&lt;BR /&gt;If your unix SA could install Samba on the unix server&lt;BR /&gt;(it's free!), you would be able to use the shared files/directories just like from another NT system.&lt;BR /&gt;&lt;BR /&gt;Mladen</description>
      <pubDate>Tue, 01 May 2001 20:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523352#M23912</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-05-01T20:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523353#M23913</link>
      <description>Wendy,&lt;BR /&gt;&lt;BR /&gt;It looks like James didn't quite test his script.  I think after "do" line, you could insert something like:&lt;BR /&gt;&lt;BR /&gt;XDIR=`dirname $X`&lt;BR /&gt;XFILE=`basename $X`&lt;BR /&gt;cd $XDIR&lt;BR /&gt;&lt;BR /&gt;and then change the line:&lt;BR /&gt;&lt;BR /&gt;put $X $X.dup&lt;BR /&gt;&lt;BR /&gt;to &lt;BR /&gt;&lt;BR /&gt;put $XFILE $XFILE.dup&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This script will not duplicate the entire directory tree.&lt;BR /&gt;It will ftp all the files (including the files under subdirectories), but they will all end up in a single directory on your NT system.&lt;BR /&gt;&lt;BR /&gt;If you'd like to duplicate the entire directory tree, you could create a tar archive, then ftp the archive to your NT system and then use Winzip on your NT system.&lt;BR /&gt;The unix part can be made automatic via a script&lt;BR /&gt;(schedule it as a cron job if you wish) - something like this:&lt;BR /&gt;&lt;BR /&gt;cd &lt;PARENT_DIRECTORY&gt;&lt;BR /&gt;tar cvf /tmp/archive.tar &lt;DIRECTORY&gt;&lt;BR /&gt;cd /tmp&lt;BR /&gt;{echo "open &lt;NTHOST&gt; &lt;BR /&gt;user &lt;USERID&gt; &lt;PASSWORD&gt; &lt;BR /&gt;put archive.tar &lt;BR /&gt;close" &lt;BR /&gt;} | ftp -i -n -v &lt;BR /&gt;&lt;/PASSWORD&gt;&lt;/USERID&gt;&lt;/NTHOST&gt;&lt;/DIRECTORY&gt;&lt;/PARENT_DIRECTORY&gt;</description>
      <pubDate>Tue, 01 May 2001 21:25:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523353#M23913</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-05-01T21:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: FTP files in all subdirectories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523354#M23914</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;A point of clarification (honor), please.  The script I posted was quick and crude, but *was tested*.  My intention was merely to show one way to recursively descend directories, and pick files to ftp.&lt;BR /&gt;&lt;BR /&gt;No points, please, Wendy.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 02 May 2001 11:46:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-files-in-all-subdirectories/m-p/2523354#M23914</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-02T11:46:07Z</dc:date>
    </item>
  </channel>
</rss>

