Question: what is the difference between cmd and bat file?
Answer: The only known difference between . cmd and . ... cmd file the ERRORLEVEL variable changes even on a successful command that is affected by Command Extensions (when Command Extensions are enabled), whereas in . bat files the ERRORLEVEL variable changes only upon errors.