Page 1 of 1

Changing filenames based on information contained in a csv

PostPosted: Mon Aug 26, 2019 10:02 pm
by Daskarzine
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

Re: Changing filenames based on information contained in a c

PostPosted: Tue Aug 27, 2019 10:19 am
by Mr_Noodle
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.

Re: Changing filenames based on information contained in a c

PostPosted: Tue Aug 27, 2019 7:22 pm
by Daskarzine
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!!

Re: Changing filenames based on information contained in a c

PostPosted: Fri Sep 06, 2019 12:40 pm
by venudhar
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.

Re: Changing filenames based on information contained in a c

PostPosted: Mon Sep 09, 2019 6:04 pm
by Daskarzine
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!