[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] can we change the extension of multiple files in SC3?
and best to add quotes to the sc example as well...
a= "/Applications/SuperCollider/sounds/*".pathMatch; //first
generate list with pathnames
( //then replace all .aiff with .xyz WARNING- MAKE BACKUP OF
AIFFSOUNDFILES IN SOUNDS/ FIRST
a.do{|x|
var pn= PathName(x);
if(pn.extension=="aiff", { //filter out .aiff files
("mv"+pn.fullPath.quote+pn.fullPath.replace("aiff",
"xyz").quote).unixCmd;
});
};
)
_f
26 dec 2009 kl. 22.15 skrev chris kummerer:
I read:
I realise the commands of yours do not change the files like:
01 inst.txt
Is there any possibility to change the extensions of all files even
with the a space in its file name?
try with quotes:
for F in *.ext; do mv "$F" "${F/.ext/}.new"; done
HTH
x
--
chris@xxxxxxxxxx Postmodernism is german romanticism with
better
http://pilot.fm/ special effects. (Jeff Keuss / via
ctheory.net)
#|
fredrikolofsson.com klippav.org musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/