Work some bug records

1: write code today, there is a very strange bug, script prompts 'xcopy' is not an internal nor external command command can not be executed, but open cmd enter xcopy can display a message,

This shows the path environment variable and other settings are valid, why not use a script execution of it!

On reflection: the problem must be a body in the script, but the script how invalidate command it! That must be the problem of path, the script uses the wrong path variable assignment errors, resulting in an incomplete path path problem.

dos commands into internal commands and external commands, internal command is a command system kernel comes not need to do any setting, an external command is essentially exe file system by the environment variable path to the directory to find commands corresponding exe file,

To process it by value, so that when the path is incorrect path, the system can not find the corresponding exe file, thus suggesting that the command is not an internal command is not an external command.

Each batch script is actually dos command-line statement, path is built-in command dos command, so it can not freely operate in batch scripts.


Released eight original articles · won praise 0 · Views 847

Guess you like

Origin blog.csdn.net/qazw9600/article/details/40744445