|
Answer» I'm trying to run a commandline call but I need the batch FILE to insert the FILENAME for each call.
Given a dir of x amount of files, I want it to run:
c:>mycommand.exe <filename> <somearguments> <filename>.inf
If would be great if I could filter the filelist like *.jpg (pseudocode):
foreach *.jpg { c:>mycommand.exe <filename> <somearguments> <filename>.inf }
Heck, if it's possible to pull the basename out, I'd rather have:
foreach *.jpg { c:>mycommand.exe <filename> <somearguments> <basename>.inf }
Any ideas?
TIAFOR /f "delims=\ " %%a in ('dir/b *.jpg') do COMMAND %%a
replace command with the command you like. This for LOOP is working with the NT4.0 command line. If you are using pure DOS the f switch is not working.
hope this helps uli
|