Creating a looping batch file with command line parameters?

I've got a command line program that edits single files to add a time length to them. You enter the name of the program into the command prompt and then the file. So like this: "test.exe file.dsf". I'm trying to make a .bat file that will loop through all of the ".dsf" files in the folder. I tried this, but it just seems to run the program for each dsf file, but it doesn't enter it as a parameter after.

ECHO OFF
ECHO BATCH test


FOR %%a IN (*.dsf) DO test.exe  

Any ideas on how to get this working? I'd appreciate it!

Answers


Add the %%a as parameter to test.exe

ECHO OFF
ECHO BATCH test
FOR %%a IN (*.dsf) DO test.exe %%a

Need Your Help

How to reduce CPU usage of textdb?

database web hosting cpu

Normally, my website based on textdb and use a low CPU usage.

How to trace a ASP.NET Security Exception

asp.net security debugging hosting

How can I figure out what is actually causing the following error? The page is the same as other pages but for some reason only this page is having this error. It also only happens on the ISP (GoDa...