I have a question about if - else structure in a batch file.
(我有一个关于if - else批处理文件中的结构的问题。)
Each command runs individually, but I couldn't use "if - else" blocks safely so these parts of my programme doesn't work. (每个命令都单独运行,但是我无法安全地使用“if - else”块,所以我的程序的这些部分不起作用。)
How can I do make these parts run? (我怎么能让这些部件运行?)
Thank you. (谢谢。)
IF %F%==1 IF %C%==1 (
::copying the file c to d
copy "%sourceFile%" "%destinationFile%"
)
ELSE IF %F%==1 IF %C%==0 (
::moving the file c to d
move "%sourceFile%" "%destinationFile%"
)
ELSE IF %F%==0 IF %C%==1 (
::copying a directory c from d, /s: bo? olanlar hari?, /e:bo? olanlar dahil
xcopy "%sourceCopyDirectory%" "%destinationCopyDirectory%" /s/e
)
ELSE IF %F%==0 IF %C%==0 (
::moving a directory
xcopy /E "%sourceMoveDirectory%" "%destinationMoveDirectory%"
rd /s /q "%sourceMoveDirectory%"
)
ask by selentoptas translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…