The REM windows command-line tool is to record comments in a batch file. To know more about this command, read this article further.
CMD Line is a ** text-based interface** that transfers the command from the user to the OS.
The command-line interpreter (CLI) for windows is CMD.EXE. Also, you can use PowerShell, which can automate many system administration tasks and these tasks are not approachable in command prompt. With the help of the CLI, you can communicate with your system by typing the text in commands. As a result, your system answers to the text that you have typed previously, and then the user can proceed with the following command line that shows up.
Run command window helps you to run programs, open the files and folders. And there are several ways to open up the run command dialog box. This run command box is helpful for you to head straight to the destined program quickly.
By using the Keyboard shortcut Key:
One of the most commonly used methods is the shortcut key method. Also, this method is in all versions of Windows. It would help if you pressed the Windows+ R ** ** key concurrently to open the Run command dialog box.
The REM windows command-line utility is to record comments in a script, batch file. It will add vertical spacing if no comment is mentioned. This command is internal
we can use this command everywhere in the command line.
REM at the start of the line indicates a comment in the batch file.
- Another method includes :: ** in the line’s starting, which has a relative impact on the REM. The ** secondary colon is not valid as a name in the double-colon, and it is interpreted as a label.
@ECHO OFF :: :: First comment REM Second comment REM Echo Hello REM This remark is displayed by echo Echo Hello & REM This remark is ignored by echo Copy work.xls backup.xls &:: We backed up the file
- Without Echo off, we should not give the double colon ** ** as it is a command too. As a result, it will display if you execute it as a batch file without Echo Off.
- A method to add a large multi-line block of comment test is by using plain text and a goto command.
@Echo OFF Goto :START Description can go here which can even include - | > characters :START
- We should not give GOTO commands ** inside brackets**. We can manage those cases by giving it inside the brackets like,
( Echo the lines below are commented Rem/||( some comment text that will work within brackets. The REM command always evaluates to TRUE so these lines will never be executed. ) )
- A message will appear like
The following usage of the path operator in batch-parameter substitution is invalid: %~
This error message shows if you interpret commands like
::%~ or REM %~
In order to dodge this issue, do not use % in comments.
You can also add a line in the middle in the batch variables, spaces, and punctuations as it does not exist. Start it with = and end it with = sign like,
@Echo off Echo This is an example of an %= Inline Comment =% in the middle of a line.
This article will let you learn about the REM command. For more information about windows, commands, visit our homepage. Leave your valuable comments in the comment section.
- RMDIR Command: Deletes a Directory The RMDIR Windows command-line tool is used to delete a directory. RMDIR command helps you to delete the directory mentioned by the Directory parameter.
- RMTSHARE Command: Shares a Folder or a Printer The RMTSHARE command-line utility tool manages the files, and the printer shares or on a local or a remote server.
- REGINI Command: Modifies Registry Permissions-RTP The REGINI command-line utility is to change the registry permissions. With the help of this command, you can modify the registry.
- REGSVR32 Command: Registers/Unregisters a DLL The REGSRV32 windows command-line tool is to register or unregister a DLL.
- REGEDIT Command: Import/Exports Registry Settings The REGEDIT windows command-line tool is to import and export registry settings.
The post REM Command: Records Commands in a Batch File -RTP appeared first on Windows Commands- SS64 Commands.