Thursday, January 27, 2011

Windows Command Line args to get file paths

%~0 - expands %I removing any surrounding quotes (")
%~f0 - expands %I to a fully qualified path name
%~d0 - expands %I to a drive letter only
%~p0 - expands %I to a path only
%~n0 - expands %I to a file name only
%~x0 - expands %I to a file extension only
%~s0 - expanded path contains short names only
%~a0 - expands %I to file attributes of file
%~t0 - expands %I to date/time of file
%~z0 - expands %I to size of file

The flags can be combined.

No comments: