Dos批处理文件没有执行的语法循环问题



这就是我所拥有的。我正在尝试执行一些基本的文件操作,但代码cmd提示符只是循环,没有执行任何活动或启动任何程序。

:loop
if not exist C:Scanned1.pdf GOTO LOOP
if exist C:Scanned1.pdf GOTO command
:command
if exist C:Program FilesMicrosoftoutlook.exe START outlook.exe /c /a C:Scanned1.pdf MOVE /Y C:Scanned1.pdf C:Recieved
if exist C:Program Files"Mozilla Thunderbird"thunderbird.exe START thunderbird.exe -compose attachment= C:Scanned1.pdf MOVE /Y C:Scanned1.pdf C:Recieved
GOTO LOOP
:loop
    if not exist "C:Scanned1.pdf" GOTO LOOP
    if exist "C:Program FilesMicrosoftoutlook.exe" (
        echo here the outlook sending code
    ) else if exist "C:Program FilesMozilla Thunderbirdthunderbird.exe" (
        echo here the thunderbird sending code
    )
    move /y "c:scanned1.pdf" "c:received"
    goto LOOP

通常情况下,必须引用带有空格的文件/路径。

最新更新