Click here to Skip to main content
12,998,759 members (68,042 online)
Click here to Skip to main content
Add your own
alternative version


1 bookmarked
Posted 28 Jan 2014

Batch Uploading Music Files to Echo Nest

, 5 Oct 2016
Rate this:
Please Sign up or sign in to vote.
Batch uploading music files to Echo Nest

This is in English for an international audience.

There is an interesting service called The Echo Nest that is a music API you can do a lot of interesting things with like The Count. But if you (like me) have music that is a bit outside the mainstream, there is the problem that they do not know about it. So I hacked together a simple package to upload mp3 files to their servers for analysis.

First you need:

Ok, my batch coding skills are very rusty, so please forgive me for this rather hackish solution.

I created the directory C:\CURLER and put curl.exe there. I also created two batch files.

One called CURLER.BAT as:

@echo off
echo %1
C:\curler\curl -X POST -H "Content-Type:application/octet-stream" 
"" --data-binary @%1
timeout /t 2

Replace YOUR_API_KEY with the API key you got from the Dev Center.

This file takes the file name of an mp3 file and uploads it to Echo Nest's servers. It does not check if they already know about it (sorry about that, I'll try to make something better later).

Well, that works, but it is a bit tedious so I made another batch file I called ALLMP3.BAT and it looks like:

@echo off
FOR /R %1 %%G IN (*.mp3) do call C:\curler\curler.bat "%%G"

It takes a directory name as parameter and loops through that and all subdirectories of it and sends them.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
Sweden Sweden
Born 1970. Not dead yet.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170622.1 | Last Updated 5 Oct 2016
Article Copyright 2014 by staffan_v
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid