Re: Renaming/Moving a Group of Filenames

From: Provoost, Richard (Richard.Provoost@ESSENT.NL)
Date: Mon Feb 02 2004 - 04:01:24 EST


Try:

ls test*.txt | cut -d'.' -f1 | xargs -t -i mv {}.txt {}.xyz

Greetings,

Richard.

-----Oorspronkelijk bericht-----
Van: Mark Monroe [mailto:mark.monroe@FORMSANDSUPPLY.COM]
Verzonden: vrijdag 30 januari 2004 17:01
Aan: aix-l@Princeton.EDU
Onderwerp: Renaming/Moving a Group of Filenames

I need help with something that I think is very simple. My mind is over
thinking the process and I cant seem to think of any easy way to accomplish
something.

I have a several files in a directory such as this:

test001.txt
test002.txt
test003.txt
test004.txt

I want to rename the extension on the whole list to be something different
like this:

test001.xyz
test002.xyz
test003.xyz
test004.xyz

Is there an easy way with the cp or mv command to take test*.txt and create
the new files as test*.xyz?

Any thoughts or ideas are appreciated,

Mark

----
This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message.


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:33 EDT