<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680865#M245339</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I face this problem too. I have to get an unknown number of files and delete them after that on the remote side.&lt;BR /&gt;mget *&lt;BR /&gt;mdelete *&lt;BR /&gt;carries the risk of deleting more files that you transferred if in the mean time new files arrive. I am using an awk script to build an ftp script.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;&lt;BR /&gt;BEGIN {print "cd $data3.tshps1";print "type image";}&lt;BR /&gt;  /^X/  {print "get " tolower($1);print "delete " tolower($1)}&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;gets all files starting with X</description>
    <pubDate>Fri, 02 Dec 2005 06:43:09 GMT</pubDate>
    <dc:creator>Michael Schulte zur Sur</dc:creator>
    <dc:date>2005-12-02T06:43:09Z</dc:date>
    <item>
      <title>FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680859#M245333</link>
      <description>Hello @ll&lt;BR /&gt;&lt;BR /&gt;Problem: I try do write a script which should copy all files from a directory where the date is bigger than a other date.&lt;BR /&gt;&lt;BR /&gt;eg.&lt;BR /&gt;i go a variable&lt;BR /&gt;echo $lastdate&lt;BR /&gt;Nov 29 15:19&lt;BR /&gt;&lt;BR /&gt;i need something like:&lt;BR /&gt;get * where date &amp;gt;= $lastdate&lt;BR /&gt;&lt;BR /&gt;i hope its possible&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 29 Nov 2005 10:02:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680859#M245333</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-11-29T10:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680860#M245334</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Have a look at the man pages for 'ftp(1)'.  You will find a variation of 'get' called 'newer':&lt;BR /&gt;&lt;BR /&gt;newer filename                                                           &lt;BR /&gt;...will get the file only if the modification time of the remote file is more recent that the file on the current system.  If the file does not exist on the current system, the remote file is considered newer.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Nov 2005 10:11:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680860#M245334</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-29T10:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680861#M245335</link>
      <description>Thanks,&lt;BR /&gt;but i will get more than one file. can I create a loop or something like that?&lt;BR /&gt;&lt;BR /&gt;it isn't possible to write 'newer *' and i don't know the name of each file. in addition i haven't any files on the local machine&lt;BR /&gt;&lt;BR /&gt;ty</description>
      <pubDate>Tue, 29 Nov 2005 10:50:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680861#M245335</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-11-29T10:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680862#M245336</link>
      <description>you should use the find command for this&lt;BR /&gt;&lt;BR /&gt;Try something like &lt;BR /&gt;&lt;BR /&gt;find / -newer &lt;REFILE&gt; -exec cp {} &lt;NEWDIR&gt; \; &lt;BR /&gt;&lt;BR /&gt;this will find all files which are newer than the timestamp of &lt;REFILE&gt; and copies them to &lt;NEWDIR&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer&lt;BR /&gt;&lt;/NEWDIR&gt;&lt;/REFILE&gt;&lt;/NEWDIR&gt;&lt;/REFILE&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:54:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680862#M245336</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2005-11-29T10:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680863#M245337</link>
      <description>Rainer,&lt;BR /&gt;we are talking about ftp!&lt;BR /&gt;&lt;BR /&gt;Baumann,&lt;BR /&gt;you can read the directory with&lt;BR /&gt;dir into a local file and then extract the names and build a list of ftp commands. You could then create a file with the specific date/time for each file found on the remote site. With the newer command you will get only those newer than the local side. I hope the remote site is in the same time zone as yours.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael</description>
      <pubDate>Fri, 02 Dec 2005 02:17:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680863#M245337</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2005-12-02T02:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680864#M245338</link>
      <description>Hi Michael Schulte,&lt;BR /&gt;thx, that's a good idea, i will try to do it. first i thought it's easier to realize it.&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 02 Dec 2005 03:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680864#M245338</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-02T03:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680865#M245339</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I face this problem too. I have to get an unknown number of files and delete them after that on the remote side.&lt;BR /&gt;mget *&lt;BR /&gt;mdelete *&lt;BR /&gt;carries the risk of deleting more files that you transferred if in the mean time new files arrive. I am using an awk script to build an ftp script.&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;&lt;BR /&gt;BEGIN {print "cd $data3.tshps1";print "type image";}&lt;BR /&gt;  /^X/  {print "get " tolower($1);print "delete " tolower($1)}&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;gets all files starting with X</description>
      <pubDate>Fri, 02 Dec 2005 06:43:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680865#M245339</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2005-12-02T06:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680866#M245340</link>
      <description>Get the whole liste&lt;BR /&gt;&lt;BR /&gt;dir . filelist &lt;BR /&gt;that works, but in a script it doesn't&lt;BR /&gt;&lt;BR /&gt;ftp -n &amp;lt;&amp;lt; END_FTP&lt;BR /&gt;open $dbserver&lt;BR /&gt;user $username $password&lt;BR /&gt;cd $archpath&lt;BR /&gt;dir . file_list&lt;BR /&gt;bye&lt;BR /&gt;END_FTP&lt;BR /&gt;&lt;BR /&gt;Here I must confirm with (y) the dir command. how can i disable the whole prompt?</description>
      <pubDate>Mon, 05 Dec 2005 05:56:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680866#M245340</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-05T05:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680867#M245341</link>
      <description>Try as,&lt;BR /&gt;&lt;BR /&gt;ftp -i -n $dbserver&amp;lt;&amp;lt;-FTP&lt;BR /&gt;user $username $password&lt;BR /&gt;cd $archpath&lt;BR /&gt;dir . file_list&lt;BR /&gt;bye&lt;BR /&gt;FTP&lt;BR /&gt;&lt;BR /&gt;And,&lt;BR /&gt;&lt;BR /&gt;dir . file_list will give present directory and file_list information rgt? why you can use as,&lt;BR /&gt;&lt;BR /&gt;dir . itself?&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Mon, 05 Dec 2005 06:04:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680867#M245341</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-12-05T06:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680868#M245342</link>
      <description>Because i need a local file with all the informations in the $archpath directory from the remote machine.</description>
      <pubDate>Mon, 05 Dec 2005 06:14:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680868#M245342</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-05T06:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680869#M245343</link>
      <description>oops, was my mistake, sry</description>
      <pubDate>Mon, 05 Dec 2005 06:24:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680869#M245343</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-05T06:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680870#M245344</link>
      <description>Muthukumar,&lt;BR /&gt;&lt;BR /&gt;dir . file_list&lt;BR /&gt;is not the same as dir . and dir file_list&lt;BR /&gt;The above command records the information in a textfile with the name file_list. Baumann will need it to extract the names of the files to get.&lt;BR /&gt;The . does not work always. The remote file system must support that.&lt;BR /&gt;Baumann, how far are you?&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2005 08:51:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680870#M245344</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2005-12-05T08:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680871#M245345</link>
      <description>i did a stupid mistake. the file_list file with the informations were in an other directory :)&lt;BR /&gt;&lt;BR /&gt;now i have all the filenames i need in a textfile.&lt;BR /&gt;&lt;BR /&gt;#textfile&lt;BR /&gt;get file1&lt;BR /&gt;get file2&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;how can i generate a ksh-script, that gets every file with ftp? we could open a connection for every file but i think it goes easier?&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2005 10:41:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680871#M245345</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2005-12-05T10:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: FTP Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680872#M245346</link>
      <description>Have a look at my awk code snippet.&lt;BR /&gt;Adjust it to your environment, save it and do&lt;BR /&gt;awk -f awkfile file_list&lt;BR /&gt;You will get a list of ftp commands which you can use as input for ftp.&lt;BR /&gt;I use .netrc for automatic login and then&lt;BR /&gt;ftp -i remote &amp;lt; createdftpfile&lt;BR /&gt;In my case the filename is in position 1 and start with X.&lt;BR /&gt;You will have to find a filter to get the filenames. Choose the transfer method and if you want to rename or delete the file on the remote host. &lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BEGIN {print "cd source";print "type image";}&lt;BR /&gt;/^X/ {print "get " tolower{$1);print "delete " tolower($1)}&lt;BR /&gt;END&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2005 11:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-script/m-p/3680872#M245346</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2005-12-05T11:06:07Z</dc:date>
    </item>
  </channel>
</rss>

