I have a Java program working with this syntax:

command.jar namefile

I have to run this program for 1600 files in a directory. How can I run this command for every file automatically?

Is there a DOS batch command? Or another way?

link|improve this question
feedback

1 Answer

up vote 6 down vote accepted

This should work for you:

For use in a batch file:

for %%f in (*) do command.jar %%f

For use from the command line:

for %f in (*) do command.jar %f
link|improve this answer
Hi! It works with this: for %f in (*) do command.jar %f Really really thanks! :) – E_M Mar 5 '10 at 9:03
@E_M: Edited my answer to make that clear. – Bobby Mar 5 '10 at 9:03
feedback

Your Answer

 
or
required, but never shown