This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

rename file on cygwin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]