Okay, I'll go back and edit that a bit more to make it clearer what I meant.
The part you are referring to is meant to be run as a batch file - paste the contents into a text file and call that file something like 'convert.cmd' or 'convert.bat' then run it from the command prompt by just typing the file name. Please remember to replace the part that reads 'path_to_your_mingw/bin_directory' with your actual path to your mingw bin directory.
The previous section(i-vi) to the one you are referring to can be entered explicitly in sequence from the command prompt, ie.
for %f in (*.lib) do reimp %f
move libd3dx9_30.a libd3dx9.a
move libd3dx9d_30.a libd3dx9d.a