0
我想要做的是在Windows 2008中一次tsak,如果文件存在(.txt)它運行一個.exe,然後刪除該文件。如果文件存在運行多個命令,而不僅僅是一個動作
是否存在C:\ test.txt的啓動C:\ test.exe的德爾C:\ test.txt的
是像上述聲明?
我想要做的是在Windows 2008中一次tsak,如果文件存在(.txt)它運行一個.exe,然後刪除該文件。如果文件存在運行多個命令,而不僅僅是一個動作
是否存在C:\ test.txt的啓動C:\ test.exe的德爾C:\ test.txt的
是像上述聲明?
與&
合併命令:
if exist c:\test.txt start c:\test.exe & del c:\test.txt
,或者使用的括號:
if exist c:\test.txt (
start c:\test.exe
del c:\test.txt
)
''&&是條件算子。您可以將命令與一個'&' – foxidrive
好點結合起來。我會解決答案。 –