First post, by ElBrunzy
- Rank
- Oldbie
Many ms-dos players dont support wildcard or dont have a frontend. I also dont want to use a shell to build playlist, or use a program to generate a playlist. I want a quick batch file that would list all files in a directory and call a software for each of them. I was never good at batch file and now that I try my luck, it's not a success at all 😠. Maybe someone more skilled than me could give me a hand ? I think my code would work in a more recent OS, but I'm not sure, the target anyway is msdos with command.com (no extender like 4dos). The problem seem to reside in the (fileset) of the FOR command. It look like in dos6.22 command.com want a file listto be here while I'd like to put a command like ("dir %2 /s /b/l") to seek subdirs.
Anyway here is what I've put up for now, if someone feel he can help?:
@echo %1 = soft to run
@echo %2 = directory to scan
@echo %3 %4 %5 = params to soft
@for /f %%f in ('dir %2 /s /b /l') do %1 %%f %3 %4 %5
let say the batch is name AP.BAT for AutomaticPlaylist(c), an example could be:
AP C:\ultrasnd\playmidi E:\midi\*.mid