<?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: Renaming multiple files within a script / batch file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123451#M448231</link>
    <description>&lt;!--!*#--&gt;A tip from the paranoid.  It is very easy to make a mistake with these types of commands, with possibly disastrous results.  Whenever I do this type of thing, I first echo it to the display.  So for example, in the proposed solution, I would do&lt;BR /&gt;&lt;BR /&gt;    echo mv ${FILE} ${FILE}.csv&lt;BR /&gt;&lt;BR /&gt;If the output is correct, recall the command from the history buffer and remove "echo".  If the output is too long, you can always pipe it through 'head'.&lt;BR /&gt;&lt;BR /&gt;Note also the curly braces.  I prefer to play it safe if one of the adjacent characters is non-alphanumneric.&lt;BR /&gt;&lt;BR /&gt;-Eric</description>
    <pubDate>Thu, 07 Aug 2008 06:49:44 GMT</pubDate>
    <dc:creator>Eric Raeburn</dc:creator>
    <dc:date>2008-08-07T06:49:44Z</dc:date>
    <item>
      <title>Renaming multiple files within a script / batch file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123448#M448228</link>
      <description>Hi Folks,&lt;BR /&gt;I'm running HP-UX 11i v1.&lt;BR /&gt;I am trying to rename multiple files within a directory.&lt;BR /&gt;The files are of the form :&lt;BR /&gt;&lt;BR /&gt;'STRyymmdd.' and need to be renamed to 'STRyymmdd.csv'&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;STR080806.&lt;BR /&gt;STR080807.&lt;BR /&gt;&lt;BR /&gt;need to become &lt;BR /&gt;STR080806.csv&lt;BR /&gt;STR080807.csv&lt;BR /&gt;&lt;BR /&gt;is there an easy way to do this?&lt;BR /&gt;&lt;BR /&gt;Any help greatfully received and rewarded!&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Simon&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Aug 2008 09:09:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123448#M448228</guid>
      <dc:creator>Simon R Wootton</dc:creator>
      <dc:date>2008-08-06T09:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files within a script / batch file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123449#M448229</link>
      <description>A simple for loop would do:&lt;BR /&gt;&lt;BR /&gt;for FILE in STR*&lt;BR /&gt;do&lt;BR /&gt;mv $FILE $FILE.csv&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 06 Aug 2008 09:18:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123449#M448229</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-08-06T09:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files within a script / batch file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123450#M448230</link>
      <description>Sorted - thanks Pete</description>
      <pubDate>Wed, 06 Aug 2008 11:46:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123450#M448230</guid>
      <dc:creator>Simon R Wootton</dc:creator>
      <dc:date>2008-08-06T11:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files within a script / batch file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123451#M448231</link>
      <description>&lt;!--!*#--&gt;A tip from the paranoid.  It is very easy to make a mistake with these types of commands, with possibly disastrous results.  Whenever I do this type of thing, I first echo it to the display.  So for example, in the proposed solution, I would do&lt;BR /&gt;&lt;BR /&gt;    echo mv ${FILE} ${FILE}.csv&lt;BR /&gt;&lt;BR /&gt;If the output is correct, recall the command from the history buffer and remove "echo".  If the output is too long, you can always pipe it through 'head'.&lt;BR /&gt;&lt;BR /&gt;Note also the curly braces.  I prefer to play it safe if one of the adjacent characters is non-alphanumneric.&lt;BR /&gt;&lt;BR /&gt;-Eric</description>
      <pubDate>Thu, 07 Aug 2008 06:49:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123451#M448231</guid>
      <dc:creator>Eric Raeburn</dc:creator>
      <dc:date>2008-08-07T06:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming multiple files within a script / batch file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123452#M448232</link>
      <description>&amp;gt;Eric: I prefer to play it safe if one of the adjacent characters is non-alphanumeric.&lt;BR /&gt;&lt;BR /&gt;Except for "_", those are the cases where it is safe to leave out the {}. :-)</description>
      <pubDate>Thu, 07 Aug 2008 15:15:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/renaming-multiple-files-within-a-script-batch-file/m-p/5123452#M448232</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-07T15:15:03Z</dc:date>
    </item>
  </channel>
</rss>

