tags:

views:

295

answers:

2

When I go to command mode and type

:!mycommand %

I get my command executed on the current file (% is expanded to the current file name). Is there a similar construct that expands the full file name (with the full path)?

I am using windows.

Thanks.

+5  A: 

Append :p, e.g.

:!mycommand %:p

And %:p:h will give you the path of the directory that the file resides in.

martin clayton
+5  A: 

:!mycommand %:p

Related:

:!cd %:p:h

Adam Backstrom