【发布时间】:2014-06-03 20:00:42
【问题描述】:
我的问题是在批处理文件中使用选择参数开始 explorer.exe。我用这个:
if exist "!SATIR!\!SATIR:~20,-23!.mp4" (explorer.exe /select, "!SATIR!\!SATIR:~20,-23!.mp4") else (explorer.exe /select, "!SATIR!\!SATIR:~20,-23!.mkv")
它可以工作,但我不想依赖特定的文件扩展名。我想对所有扩展(avi、wmv 等)使用通配符之类的东西。
使用类似的东西:if exist "!SATIR!\!SATIR:~20,-23!.*" explorer.exe /select, "!SATIR!\!SATIR:~20,-23!.*" 不起作用。在explorer.exe 部分失败。到目前为止,我一无所获。有可能吗?
PS. !SATIR! 变量包含那些 mp4 和 mkv 文件的本地地址。类似于:F:\Movies\000y.001y\The.Lord.of.the.Rings.The.Return.of.the.King.(2003){0167260}[00087]
PS. !SATIR:~20,-23! EQU The.Lord.of.the.Rings.The.Return.of.the.King
【问题讨论】:
标签: batch-file cmd windows-explorer