0
I'm trying to use Cygwin to re-organize my music folder. Currently it's in iTunes format
{Artist}/{Album}/Song ##.mp3
I want to copy the album folders up to the parent folder and add the artist name, so
~/{Artist}/{Album}
becomes ~/{Artist} - {Album}
but I am having trouble writing a script that works. Tried this:
for i in ~/music/*; { mv $i ~/'basename - $i';}
to no avail. Any help? Thanks!
Like the other script, it's hiccuping any time there are spaces in the directory name. Also, there isn't any artist/album info in the filename, just the title and track number. However, the parent folder is always the artist and each subdirectory under that folder is always the album titles. – Mathletics – 2010-12-28T02:31:11.477
Since we have already declared the album and artist as variables, if you want the album and artiste name in the filename you can change the $song output to something like $artiste"-"$album"-"$song.
As for the space issue, perhaps you could do a quick – Reuben L. – 2010-12-28T06:02:25.390
sed to replace all the spaces in filenames with underscores. – Reuben L. – 2010-12-28T06:13:00.663