Changing filenames based on information contained in a csv

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi - I've spent a time looking and can't find, so was hoping some kind soul would point me in the right direction....

I have a few hundred folders containing albums. The tracks are labeled 1_1.wav, 1_2.wav etc

Each folder containers a csv file that has the track names. So basically, can I get Hazel to peak in the folder, get the info from the csv file and change the name of the 1_1.wav to 1. Track Name.wav?

Thanks in advance if anyone can help!!



The long version:
400 folders
each folder has a unique name
each has between 1 and 50 tracks in it. Plus cover art.
each has a data.csv file (all called data.csv)

So what I need is for each track to be renamed - the csv file has a header row and 40 columns.

2 of those columns are:
Track Number Track Title

So I need the tracks changed from 1_1.wav to 1. Track title etc

The art changed to Album Title.jpg which is also in the csv

The folder then changed to Album Title
Daskarzine
 
Posts: 7
Joined: Tue Jul 16, 2019 9:14 pm

You'll need a custom script to do that at the moment. You can either use AppleScript or if you use the "Run shellscript" action, you can use the scripting language of your choice.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:You'll need a custom script to do that at the moment. You can either use AppleScript or if you use the "Run shellscript" action, you can use the scripting language of your choice.

OK, thanks Mr_Noodle, I wish I could do that!!
Daskarzine
 
Posts: 7
Joined: Tue Jul 16, 2019 9:14 pm

Hello

can a sample script be provided with explanation so that it can be customized to meet same requirements. For instance, I have a csv file with 2 columns one of which has a "name" and another containing an ID. I would like to rename file that matches the ID by appending the "name" to the current file name.

Many thanks. I dont know how to code. But should be able to customize sample code with explanations.
venudhar
 
Posts: 2
Joined: Fri Sep 06, 2019 12:00 pm

Hi venudhar - I'm not sure if you're offering a solution, or also asking for assistance - for my part as the OP I'm done if it's the former, but can't help if it's the latter - thanks!
Daskarzine
 
Posts: 7
Joined: Tue Jul 16, 2019 9:14 pm


Return to Support