Jump to content

How to play music from a macro

savorok

Ok.... im trying to set up a macro that will play all the mp3 files i have in a folder. I have a razer keyboard so i cant set up a macro to open a batch file that could run the command. but i don't know what command to use i would think that it would just be as simple as a batch file that opens the folder with all the music in it but how would i then play all the mp3 files in the folder and also if it is possible is there a way to shuffle it so everytime i put on my music it doesnt just start from the top of the file....

Link to comment
Share on other sites

Link to post
Share on other sites

So you can use a batch file or not? you said you 'cant set up a macro' but then you said it 'would just be as simple as a batch file'. Anyway, if you can use a batch file(if not sorry I'm not sure).: 

@echo off
dir /o:n /b *.mp3 > Playlist.m3u

Put this in a text file, save it as playlist.bat or whatever. Make sure it is in your mp3 folder. Then run it and it will make a .m3u (playlist) file of all of your songs. Then just use "start playlist.m3u" in a batch file and it will start the playlist. Depending on what program you're using to play the music you could just set it to random/shuffle mode. That way, you wouldn't need anything in the batch file to do it.

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, elpiop said:

So you can use a batch file or not? you said you 'cant set up a macro' but then you said it 'would just be as simple as a batch file'. Anyway, if you can use a batch file(if not sorry I'm not sure).: 


@echo off
dir /o:n /b *.mp3 > Playlist.m3u

Put this in a text file, save it as playlist.bat or whatever. Make sure it is in your mp3 folder. Then run it and it will make a .m3u (playlist) file of all of your songs. Then just use "start playlist.m3u" in a batch file and it will start the playlist. Depending on what program you're using to play the music you could just set it to random/shuffle mode. That way, you wouldn't need anything in the batch file to do it.

Ok ye now you put it like that i worded it terribly... let me try to explain it a bit better. Ok so the method you suggested worked but it plays all of the mp3 files i have on my computer so random files i have are playing... but i was wondering is it possible to have a batch file that will open a specific folder i have with all my music in it? because if there is a batch file that can do that i can use synapse to link one of my macro keys to start that batch file and that will play my music... i was wondering if i created the folder in my c drive could i direct it to that specific folder e.g. c:\documents\music\... and so on. i tried putting the batch file you suggested in the folder and it still just played all the mp3 files on my computer but it is at random so the shuffle does work. and im just using windows media player to play all of these. im mainly using that because im also using rainmeter with a music visualizer on my desktop and it links up with that to display the song name and the ability to skip/pause and so on.. so if you would know how to do that it would be great but otherwise thanks for the help.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×