1

I want to run the same command on several files in a directory on Windows 8:

for /r %1 %%G in (*.apk) do zipalign -f -v 4 %%G %2

The problem is that %%G is expanded to full path name, but I only need the filename itself. How can I do it?
(zipalign takes 2 parameters: sourcefile and destfile).

MrTux
  • 32,350
  • 30
  • 109
  • 146
RanSh
  • 189
  • 2
  • 14

1 Answers1

0

Use %%~nxG

See https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx for all possible substitutions.

MrTux
  • 32,350
  • 30
  • 109
  • 146