<?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 script from NT/W2K/W98 to L1000; HP UX 11.0 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632511#M592191</link>
    <description>OK, I did this a while ago but naturally lost the source.&lt;BR /&gt;&lt;BR /&gt;ftp command in DOS = 'ftp -n -s:file1.txt hosta'. Stick it behind an icon or in a bat file.&lt;BR /&gt;&lt;BR /&gt;Contents of file1.txt contain the ftp commands as follows,...&lt;BR /&gt;user root/passwd&lt;BR /&gt;cd bla bla bla&lt;BR /&gt;get bla bla bla&lt;BR /&gt;bye&lt;BR /&gt;&lt;BR /&gt;If you want to avoid prompts, use the -i option on the ftp command. PS. I have just finished testing this, it should work OK.&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
    <pubDate>Tue, 18 Dec 2001 16:50:09 GMT</pubDate>
    <dc:creator>Ian Dennison_1</dc:creator>
    <dc:date>2001-12-18T16:50:09Z</dc:date>
    <item>
      <title>ftp script from NT/W2K/W98 to L1000; HP UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632506#M592186</link>
      <description>One of our customers needs to send us ascii files from several MS boxes to our L1000. Our app on the L1000 will read each file to create a new end customer.&lt;BR /&gt;&lt;BR /&gt;I set them up as a user on the L1000 and want them to ftp the files to that home directory.&lt;BR /&gt;&lt;BR /&gt;They asked me to give them an ftp script, which I did:&lt;BR /&gt;&lt;BR /&gt;ftp -i -n &amp;lt;&amp;lt; EOF&lt;BR /&gt;open ip_of_my_L1000&lt;BR /&gt;user username passwd&lt;BR /&gt;put local_path_of_file_on_MS_machines&lt;BR /&gt;prompt off&lt;BR /&gt;bye&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;This works fine for me between UNIX systems, but they don't know how to get it to work on their PCs. I'm not sure how to get it to work in a script on a PC w/out accessing the script from  "Start"; "Run", "Open" and run it as a script from that point.&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Dec 2001 16:33:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632506#M592186</guid>
      <dc:creator>Richard Darling</dc:creator>
      <dc:date>2001-12-18T16:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632507#M592187</link>
      <description>You can create a batch file:&lt;BR /&gt;&lt;BR /&gt;Just create a text file with it and rename it to:&lt;BR /&gt;&lt;BR /&gt;name.bat&lt;BR /&gt;This will create an executable batch file similar to what you are using on UNIX.&lt;BR /&gt;&lt;BR /&gt;There are also some versions of cron for windown around for free.</description>
      <pubDate>Tue, 18 Dec 2001 16:36:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632507#M592187</guid>
      <dc:creator>Alan Casey</dc:creator>
      <dc:date>2001-12-18T16:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632508#M592188</link>
      <description>continued....&lt;BR /&gt;&lt;BR /&gt;the batch file can go on the desktop and just double click it to run the job.&lt;BR /&gt;Can also be executed in dos.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Dec 2001 16:37:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632508#M592188</guid>
      <dc:creator>Alan Casey</dc:creator>
      <dc:date>2001-12-18T16:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632509#M592189</link>
      <description>Thanks Alan, &lt;BR /&gt;They were attempting to run it with a .com extension for some reason. Works fine now.</description>
      <pubDate>Tue, 18 Dec 2001 16:46:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632509#M592189</guid>
      <dc:creator>Richard Darling</dc:creator>
      <dc:date>2001-12-18T16:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632510#M592190</link>
      <description>Hi Richard:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When I have to do ftp scripting nowadays, I use perl with the Net::FTP module (available for download at &lt;A href="http://www.perl.org/CPAN)." target="_blank"&gt;www.perl.org/CPAN).&lt;/A&gt; It really makes FTP operations very simple. Any error conditions and timeouts are easy to test for and set. The other advantage is that unlike shell script based solutions, your perl scripts can run unchanged on NT and W2K boxes if you install the freely available product ActivePerl (&lt;A href="http://www.activeperl.com)" target="_blank"&gt;www.activeperl.com)&lt;/A&gt; . It's also very easy to add error checking as well. Be sure to download the Net::FTP module from &lt;A href="http://www.perl.com/CPAN." target="_blank"&gt;www.perl.com/CPAN.&lt;/A&gt; It may be on ActivePerl's site as well. &lt;BR /&gt;&lt;BR /&gt;It's usually something as simple as: &lt;BR /&gt;&lt;BR /&gt;use Net::FTP; &lt;BR /&gt;use strict;&lt;BR /&gt;&lt;BR /&gt;$ftp = Net::FTP-&amp;gt;new("remhost.xxx.yyy", Debug =&amp;gt; 0); &lt;BR /&gt;$ftp-&amp;gt;login("anonymous",'cstephen@mama.com'); &lt;BR /&gt;$ftp-&amp;gt;cwd("/Downloads"); &lt;BR /&gt;$ftp-&amp;gt;get("Testfile.TXT");&lt;BR /&gt;$my $stat = $ftp-&amp;gt;status;&lt;BR /&gt;if ($stat == 2)&lt;BR /&gt;  {&lt;BR /&gt;    print "Get was Good\n"&lt;BR /&gt;  }&lt;BR /&gt;else&lt;BR /&gt;  {&lt;BR /&gt;    print "Get was bad; Status ",$stat,"\n";&lt;BR /&gt;  } &lt;BR /&gt;$ftp-&amp;gt;quit; &lt;BR /&gt;&lt;BR /&gt;That truly is about as clean as it gets and with error checking to boot. With just a bit more work, you can add a signal handler to cover the timeouts in case a command hangs.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Tue, 18 Dec 2001 16:47:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632510#M592190</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-12-18T16:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632511#M592191</link>
      <description>OK, I did this a while ago but naturally lost the source.&lt;BR /&gt;&lt;BR /&gt;ftp command in DOS = 'ftp -n -s:file1.txt hosta'. Stick it behind an icon or in a bat file.&lt;BR /&gt;&lt;BR /&gt;Contents of file1.txt contain the ftp commands as follows,...&lt;BR /&gt;user root/passwd&lt;BR /&gt;cd bla bla bla&lt;BR /&gt;get bla bla bla&lt;BR /&gt;bye&lt;BR /&gt;&lt;BR /&gt;If you want to avoid prompts, use the -i option on the ftp command. PS. I have just finished testing this, it should work OK.&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
      <pubDate>Tue, 18 Dec 2001 16:50:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script-from-nt-w2k-w98-to-l1000-hp-ux-11-0/m-p/2632511#M592191</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2001-12-18T16:50:09Z</dc:date>
    </item>
  </channel>
</rss>

