sometimes in Windows to run some CMD commands or command files: batch command files such as.bat,.cmd files,.exe files CMD window will flash back, there will be some error reasons, we would like to see, in order to targeted to solve the problem. At this time can think of is output error to the log file to preserve the view or record the screen software with high frame rate CMD window flash back inside displayed error information.
for now, I’m only going to talk about output to the log .
situation 1: run the command flash back directly in CMD.
solution: enter the command in the newly opened CMD window in the format: command > > log.txt
for example: ipconfig/all> > D:\test\log.txt is to output IP configuration information to the path D:\test\log.txt log file,
if the path is log.txt means output to the current directory,
like ipconfig/all> > Log.txt outputs logs to the C:\Windows\System32 directory, and the program that runs the ipconfig/all command ipconfig.exe is in the C:\Windows\System32 directory
Situation 2: run the.exe (.cmd,.bat, etc.) program
solution: in the directory where exe program is located, hold Shift and right-click in the blank, enter the command in the open CMD window, the format is: exe program name > > log.txt
log output path as in scenario 1.
note: double-clicking the.exe,.cmd,.bat file will have the same effect as typing the program name on the CMD command line in scenario 2 to start the program.
USES scenario 2 to process and run visible exe,.cmd,.bat files. It has more advantages than double-clicking to run them. It is more controllable in the whole process, and more parameters can be added to the command line to assist running these files, such as making the run log TXT file.
- Django reads the txt file in view
- @In slf4j log.info Compile error: cannot find symbol log
- Eclipse startup error: an error has occurred.See the log file E:\workspace\.metadata\.log.
- Use jstack to output the stack information in Java process to the specified file and analyze it
- About WLW (Windows Live Writer): “unable to connect to your log service: invalid server response” solution
- Windows 7 system, start to run input CMD, the window flashed by, disappeared
- Solution to the problem of console output window’s CMD flashing back when vs2015 writes C + + program
- openssl TXT_DB error number 2 failed to update database
- Convert document txt to UNIX code under Linux
- [HTML] Python extracts HTML text to TXT
- CMake Error: The source directory “opencv_install_catalog“ does not appear to contain CMakeLists.txt.
- CMake Error: The source directory “*” does not appear to contain CMakeLists.txt.
- Consult IDE log for more details (Help | Show Log)，read failed, socket might closed or timeout,
- Failed to write output file ‘C:’ windows\ Microsoft.NET \Framework64\v4.0.30319\Temporary ASP.NET Files\root\106f9ae8\cc0e1
- CMake Error: The source directory “/home/Demo1“ does not appear to contain CMakeLists.txt.
- Centos7 forgot the root password and could not log in to the system
- Message log output sbridge: Handling MCE memory error error
- Nginx error log (error_ Log) configuration and information explanation
- The browser console reports failed to load resource: net :: ERR_CONNECTION_RESET, which results in unable to log in
- Microsoft edge was unable to log in. Error code: 3,15, – 2147023579