<?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 FTP Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441072#M7455</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have the following script to send a specific file to a specific IP.  I would like to put my script file in one place and actual file to transfer is another directory.  But when I tried to put in the full path of sourcefile I got an error.  Can anyone help?  How would I tell ftp to look in the other directory and put the file?  The script runs fine when the script file and sourcefile are in the same directory.    Also, I will run this fron cron, do I have to change the script to accomodate for cron?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# machine=$1&lt;BR /&gt;# sourcefile=$2&lt;BR /&gt;# destfile=$3&lt;BR /&gt;ftp -n -i &amp;lt;&amp;lt;-EOF&lt;BR /&gt;        open xxx.xxx.xxx.xxx&lt;BR /&gt;        user username passwd&lt;BR /&gt;        binary&lt;BR /&gt;        mput pic.jpg &lt;BR /&gt;        quit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help,&lt;BR /&gt;Sanjay.</description>
    <pubDate>Tue, 29 Aug 2000 21:53:08 GMT</pubDate>
    <dc:creator>Sanjay Tailor</dc:creator>
    <dc:date>2000-08-29T21:53:08Z</dc:date>
    <item>
      <title>FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441072#M7455</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have the following script to send a specific file to a specific IP.  I would like to put my script file in one place and actual file to transfer is another directory.  But when I tried to put in the full path of sourcefile I got an error.  Can anyone help?  How would I tell ftp to look in the other directory and put the file?  The script runs fine when the script file and sourcefile are in the same directory.    Also, I will run this fron cron, do I have to change the script to accomodate for cron?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# machine=$1&lt;BR /&gt;# sourcefile=$2&lt;BR /&gt;# destfile=$3&lt;BR /&gt;ftp -n -i &amp;lt;&amp;lt;-EOF&lt;BR /&gt;        open xxx.xxx.xxx.xxx&lt;BR /&gt;        user username passwd&lt;BR /&gt;        binary&lt;BR /&gt;        mput pic.jpg &lt;BR /&gt;        quit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help,&lt;BR /&gt;Sanjay.</description>
      <pubDate>Tue, 29 Aug 2000 21:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441072#M7455</guid>
      <dc:creator>Sanjay Tailor</dc:creator>
      <dc:date>2000-08-29T21:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441073#M7456</link>
      <description>If you do a "put /export1/images/xxx.jpg" then that path must exist on both the source and destination systems.  Instead of that, put a line "cd /export1/images" (or whereever) in your script just before the line where you invoke ftp if you need to change the directory on the souse system.  Or put cd line after the ftp line to change the directory on the destination system.</description>
      <pubDate>Tue, 29 Aug 2000 22:18:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441073#M7456</guid>
      <dc:creator>Paul Hite</dc:creator>
      <dc:date>2000-08-29T22:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441074#M7457</link>
      <description>Sanjay:&lt;BR /&gt;&lt;BR /&gt;1. After the line for user / password, do:&lt;BR /&gt;&lt;BR /&gt;$ACTION $LOCALFILE $REMOTEFILE&lt;BR /&gt;&lt;BR /&gt;where ACTION is "put" or "get" and LOCALFILE is the name of the file on the host that this script is running; and REMOTEFILE is the name of the file on the server to which you are putting or getting.&lt;BR /&gt;&lt;BR /&gt;2.  I would use absolute paths for the LOCALFILE and REMOTEFILE.  This will allow you to cd to the directory in which your script resides, pass the arguments you want for LOCALFILE &amp;amp; REMOTEFILE, and execute.&lt;BR /&gt;&lt;BR /&gt;3.  The script as you have shown should work fine under cron.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Aug 2000 22:20:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441074#M7457</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-08-29T22:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441075#M7458</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thank you for your suggestions.  While offline, I looked at the FTP man page (again) and found a command called lcd which lets me change the local directory to whatever I want.  I tried it and it seems to be working.  I put it into the script right after I supply the  username and passwd.&lt;BR /&gt;&lt;BR /&gt;Sanjay.&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Aug 2000 22:28:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441075#M7458</guid>
      <dc:creator>Sanjay Tailor</dc:creator>
      <dc:date>2000-08-29T22:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441076#M7459</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;Your most welcome!!!  Points are always appreciated too.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Aug 2000 22:33:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441076#M7459</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-08-29T22:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441077#M7460</link>
      <description>I hope that the example shown below will help you.&lt;BR /&gt;&lt;BR /&gt;# ftp -v -n &amp;lt; ftp.script&lt;BR /&gt;(Inside of ftp.script file)&lt;BR /&gt;&lt;BR /&gt;open &lt;HOSTNAME or="" ip="" address=""&gt;&lt;BR /&gt;user xxx yyy&lt;BR /&gt;prompt off&lt;BR /&gt;cd &lt;DIRECTORY&gt; -&amp;gt; Change a directory on a remote system.&lt;BR /&gt;lcd &lt;DIRECTORY&gt; -&amp;gt; Change a directory on a local system.&lt;BR /&gt;binary&lt;BR /&gt;mget filename&lt;BR /&gt;bye&lt;BR /&gt;&lt;/DIRECTORY&gt;&lt;/DIRECTORY&gt;&lt;/HOSTNAME&gt;</description>
      <pubDate>Fri, 01 Sep 2000 02:44:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/2441077#M7460</guid>
      <dc:creator>Insu Kim</dc:creator>
      <dc:date>2000-09-01T02:44:24Z</dc:date>
    </item>
  </channel>
</rss>

