Windows batch files: .bat vs .cmd?

前端 未结 13 1732
傲寒
傲寒 2020-11-22 17:01

As I understand it, .bat is the old 16-bit naming convention, and .cmd is for 32-bit Windows, i.e., starting with NT. But I continue to see .bat fi

13条回答
  •  囚心锁ツ
    2020-11-22 17:13

    Since the original post was regarding the consequences of using the .bat or .cmd suffix, not necessarily the commands inside the file...

    One other difference between .bat and .cmd is that if two files exist with the same file name and both those extensions, then:

    • entering filename or filename.bat at the command line will run the .bat file

    • to run the .cmd file, you have to enter filename.cmd

提交回复
热议问题