4.505 bytes

Service Hints & Tips

Document ID: DSET-3FDAZ8

Aptiva - What is the REM command and what is it used for?

Applicable to: United States

What is the REM Command?

The REM command adds comments or line spacing to a batch file or a CONFIG.SYS file. A comment can be any string of letters up to 123 characters. Comments are informational in nature and are not executable parts of batch files or the CONFIG.SYS. Comments are displayed when the batch processing reaches the REM command only if ECHO is ON. If ECHO is OFF, the REM statement and the comments are not displayed.

What is the REM command used for in the AUTOEXEC.BAT or CONFIG.SYS?

You can use the REM (remark) command in front of a line that you do not want DOS to use, rather than actually deleting the line. Using this command tells DOS you do not want it to execute the information contained in this statement. Therefore, DOS effectively ignores the lines beginning with REM.

Deleting lines in these two important DOS files may cause more problems than if they were left intact. Thus, we recommend trying the REM command.

There are three advantages to using REM over deleting the line:

1. Without deleting the information contained in the line, REM allows you to test the performance of the file. This process allows you to keep the information in the event the change was not beneficial.

2. REM keeps the command line for future reference and/or editing. This is important should the line, such as a device driver, be needed again in the future.

3. REM preserves the command line in case it was accidentally mistaken for a similar line that should have been omitted.

Since the CONFIG.SYS and AUTOEXEC.BAT files do not display or recognize remarks (statements beginning with the REM command) no harm comes to the system by using the REM instead of deleting the line.

If you are working with CONFIG.SYS and/or AUTOEXEC.BAT, you may consider this tip before you remove any of the lines you have in these files. Also, it is a good idea to keep copies of the original files under a different name (such as CONFIG.OLD or AUTOEXEC.SAV) for reference. Many people keep these files in the C:\DOS directory.

Search Keywords

Hint Category

DOS/Windows 3.x, Windows 95, Windows 98

Date Created

21-03-97

Last Updated

09-03-99

Revision Date

09-03-2000

Brand

IBM Aptiva

Product Family

Aptiva, PS/1

Machine Type

2134, 2136, 2137, 2138, 2139, 2140, 2142, 2144, 2153, 2159, 2161, 2162, 2168, 2176, 2011, 2121, 2123, 2133, 2155

Model

ALL

TypeModel

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes