Detta är en egen liten kom-i-håg-post, jag har googlat efter dessa många gånger:
%1 |
Original argument |
“C:\Users\DMoore\Documents\Document Name.txt” |
%~1 |
Expands %1 and removes any surrounding quotation marks (“”). |
C:\Users\DMoore\Documents\Document Name.txt |
%~f1 |
Expands %1 to a fully qualified path name. |
C:\Users\DMoore\Documents\Document Name.txt |
%~d1 |
Expands %1 to a drive letter. |
C: |
%~p1 |
Expands %1 to a path. |
\Users\DMoore\Documents\ |
%~n1 |
Expands %1 to a file name. |
Document Name |
%~x1 |
Expands %1 to a file extension. |
.txt |
%~s1 |
Expanded path contains short names only. |
C:\Users\DMoore\DOCUME~1\DOCUME~1.TXT |
%~a1 |
Expands %1 to file attributes. |
–a—— |
%~t1 |
Expands %1 to date and time of file. |
19/08/2009 02:53 p.m. |
%~z1 |
Expands %1 to size of file. (bytes) |
9 |