[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1.   Substitution of batch parameters (%n) has been enhanced.  You can
  2.   now use the following optional syntax:
  3.       %~1         - expands %1 removing any surrounding quotes (")
  4.       %~f1        - expands %1 to a fully qualified path name
  5.       %~d1        - expands %1 to a drive letter only
  6.       %~p1        - expands %1 to a path only
  7.       %~n1        - expands %1 to a file name only
  8.       %~x1        - expands %1 to a file extension only
  9.       %~s1        - expanded path contains short names only
  10.       %~a1        - expands %1 to file attributes
  11.       %~t1        - expands %1 to date/time of file
  12.       %~z1        - expands %1 to size of file
  13.       %~$PATH:1   - searches the directories listed in the PATH
  14.                      environment variable and expands %1 to the fully
  15.                      qualified name of the first one found.  If the
  16.                      environment variable name is not defined or the
  17.                      file is not found by the search, then this
  18.                      modifier expands to the empty string
  19.   The modifiers can be combined to get compound results:
  20.       %~dp1       - expands %1 to a drive letter and path only
  21.       %~nx1       - expands %1 to a file name and extension only
  22.       %~dp$PATH:1 - searches the directories listed in the PATH
  23.                      environment variable for %1 and expands to the
  24.                      drive letter and path of the first one found.
  25.       %~ftza1     - expands %1 to a DIR like output line
  26.   In the above examples %1 and PATH can be replaced by other
  27.   valid values.  The %~ syntax is terminated by a valid argument
  28.   number.  The %~ modifiers may not be used with %*
复制代码

More detail: call/?&for/?
心绪平和,眼藏静谧。

TOP

返回列表