X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <cf09ac7f0711022351i58c7a034p12f43f085abdfa04@mail.gmail.com>
Date: Sat, 3 Nov 2007 14:51:08 +0800
From: "Muhammad Najmi Ahmad Zabidi" <najmi.zabidi@gmail.com>
To: cygwin@cygwin.com
Subject: rename file on cygwin
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hi all.

I have this kind of file name:

$ ls *.mp3*
agama dan aqidah b.mp3@encid=U2FsdGVkX1-SGjIrW9vhJhh1Py
-h2cpUXJWMQf1Bj04=


Which I want to rename to this:
$ ls *.mp3*|awk -F"@*" {'print $1'}

agama dan aqidah b.mp3


I tried to use "for" loop but since the old name contains spaces, I've
to deal with the spaces as well. I googled and found the solution of
using "rename", and my cygwin contains this tool as well.

 rename.exe -n 's/.mp3*/.m3/' *.mp3*

But nothing happen,even the error reporting. What was happened actually?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

