HaloChris117 Posted January 11, 2009 Share Posted January 11, 2009 Hello, I am trying to create a simple batch program to create a Playlist here is what I have so far @echo off dir *.mp3 *.wma *.wmv *.avi /b >"0playlist.m3u" ren "0playlist.m3u" "00 %cd%.m3u" My end goal is to have the playlist be the same name as folder that it is in, so for example, if I put the batch file in a folder named "Rammstein - Mutter" than the playlist that gets created would be "Rammstein - Mutter.m3u" the 00 in the output name are there only to have the playlist at the top when sorted by name. what I need is to replace %cd% with something that will just give me just the folder name as a veritable output, as %cd% gives me the full path. (ex. "c:\users\public\music\Rammstein - Mutter\") creating the playlist works exactly the way I want it to it is only a problem with the ren (rename) part of it. Thanks for any help that you can give. And yes I have google'd it but the only thing I was able to come up with was %~dp1 which basically does the same thing. ---------------------- Reason For Edit : Clarification of my end goal Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.