<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
From the top of my head:<br>
<br>
for old in *.gsm ; do<br>
new=`echo $old | cut -d- -f4`<br>
mv $old $new<br>
done<br>
<br>
Test it first by putting an echo in front of the mv :-)<br>
<br>
<div class="moz-cite-prefix">On 27/11/2012 23:43, Rob Jefferis
wrote:<br>
</div>
<blockquote cite="mid:CCDB008D.40914%25rob@letchmore.co.uk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div>Hi guys, I have a load of files in a directory with file
names similar to below</div>
<div><br>
</div>
<div>OUT119-20120702-084956-1341215396.177198.gsm</div>
<div><br>
</div>
<div>It is basically
OUT(dialingextensionnumber)-DATE-TIME-UNIQUEID.gsm</div>
<div><br>
</div>
<div>I would like to somehow bulk rename all the files in this
folder to strip everything other than the uniqueid.gsm bit</div>
<div><br>
</div>
<div>So in this case I want the file to end up called </div>
<div><br>
</div>
<div>1341215396.177198.gsm</div>
<div><br>
</div>
<div><br>
</div>
<div>Is there a quick way to do this?</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Rob</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Watford mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Watford@mailman.lug.org.uk">Watford@mailman.lug.org.uk</a>
<a class="moz-txt-link-freetext" href="https://mailman.lug.org.uk/mailman/listinfo/watford">https://mailman.lug.org.uk/mailman/listinfo/watford</a>
</pre>
</blockquote>
<br>
</body>
</html>