When I go to command mode and type
:!mycommand %
I get my command executed on the current file (% is expanded to the current
%
:!mycommand %:p
Related:
:!cd %:p:h