You need <B>for</B>:<BR><pre class="ip-ubbcode-code-pre">Runs a specified command for each file in a set of files. FOR %variable IN (set) DO command [command ...
The modifiers can be combined to get compound results: %~dpI - expands %I to a drive letter and path only %~nxI - expands %I to a file name and extension only %~fsI ...