문제

This is just a simple question. There are the following two lines of codes:

taskkill /F /IM notepad.exe

and---

taskkill /IM notepad.exe /F

In my test, it doesn't matter.
But in other languages / program, WILL IT MATTER?

도움이 되었습니까?

해결책

There is no universal standard for parsing command line arguments. Each command/program is free to establish its own rules for parsing arguments. Some programs or commands require switches to be in specific places. Some don't care.

The DIR internal command allows switches to be placed anywhere and yield the same result.

The FINDSTR external command requires all switches to be at the beginning.

The COPY command allows the /A and /B switches to be anywhere, but with different meanings. Placing /A or /B at the beginning establishes a default format; after a source file name specifies the format for the preceding file; after the target establishes the format for the target.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top