Question Is there a way to rename cds track filename in bulk from an Excel list or any other semi-automation / automation process?

pwangdel

Member
Nov 20, 2009
33
2
71
Greetings:

I have about 43,000 audio files in trackxx.wav format. I have to manually replace trackxx filenames with their corresponding long song name and the artist (ex: track01.wav = 01. ABCD... - EFGH... .WAV, track02.wav = 02. IJKL... - MNOP... .WAV and so forth). It takes me forever to finish this project. I am thinking of OCR the CDs cover, put it in Excel and concatenate with artist but don't know how to replace these track filename in bulk from the Excel list. Any suggestion to somewhat automate, reduce the time or making this project less painful would be greatly appreciated.
 
Jul 27, 2020
13,174
7,828
106
If you can share a short google sheet with the sample format that you will follow in creating the records, I can create the command for you (if the pattern makes sense, it's doable).
 

pwangdel

Member
Nov 20, 2009
33
2
71
Thank you so much for your offer to help.
As requested here is the link to the file name conversion project.

FYI:
- I try Concatenate multiple cells in Google sheet to no avail. So I cheated by creating them in Excel and copy their values to Google sheet.
- Example provided is for 9 tracks but some CDs / DVDs may have more than 16 tracks.

From:
1668262408136.png

To Options 1:
1668264186495.png

To Options 2:
1668262465079.png
 
Jul 27, 2020
13,174
7,828
106
That was really easy. I thought it was something complicated.

FROM sheet formula:

=A2&B2&C2

To Options 1 formula:

=A2&" "&B2&" "&C2&" "&D2&E2&F2

To Options 2 formula:

=A2&" "&B2&" "&C2&D2&E2

I have used the simple comparison to verify that both strings are matching:

=D2=E2

1668265877647.png

For concatenation, just use & between cell references.

If you want to use space or any other character as a separator that isn't pasted in a cell, just use something like this:

A1&" "&B1

With hyphen as separator, it would be A1&"-"&B1
 

pwangdel

Member
Nov 20, 2009
33
2
71
Thank you for your quick response and Google sheet concatenate lesson.

The complicated part is how to bulk rename or convert them in Windows Explorer.

I wonder if there is a way to get the data from Excel / Google Sheet and rename the files in Windows Explorer (track01.wav...track10.wav) automatically instead of copying & pasting line by line.

From: To:
1668274702559.png 1668275330876.png
 
Jul 27, 2020
13,174
7,828
106
All cells in column A have this: ren
Cells in column B have the track01 02 etc. filenames.
Cells in column C have the full filenames.

In cell D1, you type this: =A1&" "&B1&" "&C1 and copy this formula down to the last filename.

Now copy the commands from D1 to D10 or whatever.

Paste them in a text file in the same folder where the track files are.

Rename the text file to batchren.cmd or anything else. But extension should be cmd. Make sure to uncheck the option "hide extensions of file types" in your Folder Options:

1668281172228.png

Select the batchren.cmd and press enter once to run it. Press F5 to refresh the folder and you should find all the names changed.
 

pwangdel

Member
Nov 20, 2009
33
2
71
Thank you for the detail instruction.

I follow steps by steps and it doesn't seem to work.

I also try to include the extensions and still no go.

Not sure what I am missing.

By the way, my OS is Windows 10 Pro v21H2 build 19044.2251

1668637168371.png

1668638235363.png

1668637282471.png

1668637344941.png

1668637445326.png
 
Jul 27, 2020
13,174
7,828
106
My mistake. The filename with the song should be included in quotes.

Here is the revised formula: =A1&" "&B1&" "&CHAR(34)&C1&CHAR(34)

Make sure that the batchren.cmd contains the commands like this:

1668639435159.png

But with the revised formula, the first command will be ren track01.WAV "PHUONG BUON.WAV"

and so on. It will only work if you include the extensions.
 
  • Love
Reactions: pwangdel

pwangdel

Member
Nov 20, 2009
33
2
71
I think the culprit is that the folder is read only. I remove it from the folder property; however once I hit apply and ok. Reopened the folder property and it went back to read only again.

I google and find below instructions; however, as you can see from the screen shot, there is no Security tab.

More digging and find out that Remove Security tab in gpedit were not configured. Follow the instruction set it to Disable, restart the PC and still no Security tab. Any idea?

1668642148976.png

-------------------------------------------------
  1. Right-click the folder, then select Properties.
  2. Go to Security tab, then click Advanced.
  3. Click Change to the right of Owner.
  4. Enter Users into the box, then click OK.
  5. Enable the checkbox Replace owner on sub containers and objects, then click Apply.
  6. If prompted that You do not have permissions to read, click Yes.
  7. Completely close out of the Advanced Security Settings dialog.
  8. Repeat step 1.
  9. Go to Security tab, then click Edit.
  10. Select Add.
  11. Enter Users into the box and click OK.
  12. Enable the Full Control checkbox, then click OK
-------------------------------------------------

Vjt1nO8b-3BuDC_TCg8OgvGJJlFYfvx83FeYlpwkBaepuEnM9G0UfAd3v7OS0a2fEn0-7xw_83-HsxhcIyRuAiBASqfnM0RxkPClSsIfmrlv5sxwjitlPuXxe0-s0HV0H2XFqUt5WbWpzGacaV1jdtszwzwr6JlQnrY=s0-d-e1-ft


LKX8QiZ_hkvTwWK910TkjjeDN6XmBti-RNEIS46LRvOmE01qfRj3OyAe-tWsBdNXjc1jw21aNj8g1FgTGaUegriXBYrothDgMLWSeKPEAEfbgc3r5ztsrayYErDZL_ll77tcElKDb5BUaLhvWRTWoum5yk41LyD8e0o=s0-d-e1-ft


IitWKuxfDQpYGbFes6UNAdCu67lWiApl3dT8c8sreliN79nxOVSkSBS47pAkBd4N3_PYssTteqsviwD-CdeN21D5yQP2mDcKpKv0dy1E-C3bdFQtTLdDOefnTizbIEr_nEhcMcGHZ--KS4Rv2z8hfUdWWoXirpGNO9M=s0-d-e1-ft
 

Attachments

  • 1668638846375.png
    1668638846375.png
    50.9 KB · Views: 1
  • 1668638964815.png
    1668638964815.png
    41.6 KB · Views: 1
  • 1668639561163.png
    1668639561163.png
    303.8 KB · Views: 1

pwangdel

Member
Nov 20, 2009
33
2
71
Nah. You don't owe me anything. But feel free to give me more chances to refine my Excel skills :D

That char(34) was something new for me :)
Completely forget about famous DOS command and have a chance to learn new things.
So simple but so effective without needing any programming skills like me. It works like a charm / magic and most importantly shaves about 2/3 of my time with almost 0 typo.
Once again, can't ever thank you enough and hope that I can return this favor some day.
 
  • Like
Reactions: igor_kavinski
Jul 27, 2020
13,174
7,828
106
most importantly shaves about 2/3 of my time with almost 0 typo.
I'm actually a really lazy procrastinator. Do a lot of this stuff in my job. There's something addictive about the thrill of accomplishing something when the clock's ticking and you barely make it in the nick of time. A lot of times I curse my lazy ass for waiting till the last minute but then when all ends well and I pretend to be Tom Cruise in Office Impossible, I let out a sigh of relief and relish in my almost-failure-turned-success :D

If you ever want to feel that, play the game Uplink. You will know what I mean :)
 
  • Like
Reactions: ch33zw1z