How do I add mass comments into Windows Command prompt?
<p>I have a lot of text I would like to add as a comment. For example, I want to put the enitre help section of CHKDSK:</p>

<pre>
Checks a disk and displays a status report.


CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]


  volume              Specifies the drive letter (followed by a colon),
                      mount point, or volume name.
  filename            FAT/FAT32 only: Specifies the files to check for
                      fragmentation.
  /F                  Fixes errors on the disk.
  /V                  On FAT/FAT32: Displays the full path and name of every
                      file on the disk.
                      On NTFS: Displays cleanup messages if any.
  /R                  Locates bad sectors and recovers readable information
                      (implies /F, when /scan not specified).
  /L:size             NTFS only:  Changes the log file size to the specified
                      number of kilobytes.  If size is not specified, displays
                      current size.
  /X                  Forces the volume to dismount first if necessary.
                      All opened handles to the volume would then be invalid
                      (implies /F).
  /I                  NTFS only: Performs a less vigorous check of index
                      entries.
  /C                  NTFS only: Skips checking of cycles within the folder
                      structure.
  /B                  NTFS only: Re-evaluates bad clusters on the volume
                      (implies /R)
  /scan               NTFS only: Runs a online scan on the volume
  /forceofflinefix    NTFS only: (Must be used with "/scan")
                      Bypass all online repair; all defects found
                      are queued for offline repair (i.e. "chkdsk /spotfix").
  /perf               NTFS only: (Must be used with "/scan")
                      Uses more system resources to complete a scan as fast as
                      possible. This may have a negative performance impact on
                      other tasks running on the system.
  /spotfix            NTFS only: Runs spot fixing on the volume
  /sdcleanup          NTFS only: Garbage collect unneeded security descriptor
                      data (implies /F).
  /offlinescanandfix  Runs an offline scan and fix on the volume.
  /freeorphanedchains FAT/FAT32/exFAT only: Frees any orphaned cluster chains
                      instead of recovering their contents.
  /markclean          FAT/FAT32/exFAT only: Marks the volume clean if no
                      corruption was detected, even if /F was not specified.

The /I or /C switch reduces the amount of time required to run Chkdsk by
skipping certain checks of the volume.
</pre>

<p>However, it is very annoying (and time-consuming) to have to put <code>rem</code> tags on the front of every line of code, like:</p>

<pre>
rem Checks a disk and displays a status report.


rem CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]


rem   volume              Specifies the drive letter (followed by a colon),
rem                       mount point, or volume name.
rem   filename            FAT/FAT32 only: Specifies the files to check for
rem                       fragmentation.
rem   /F                  Fixes errors on the disk.
rem   /V                  On FAT/FAT32: Displays the full path and name of every
rem                       file on the disk.
rem                       On NTFS: Displays cleanup messages if any.
rem   /R                  Locates bad sectors and recovers readable information
rem                       (implies /F, when /scan not specified).
rem   /L:size             NTFS only:  Changes the log file size to the specified
rem                       number of kilobytes.  If size is not specified, displays
rem                       current size.
rem   /X                  Forces the volume to dismount first if necessary.
rem                       All opened handles to the volume would then be invalid
rem                       (implies /F).
rem   /I                  NTFS only: Performs a less vigorous check of index
rem                       entries.
rem   /C                  NTFS only: Skips checking of cycles within the folder
rem                       structure.
rem   /B                  NTFS only: Re-evaluates bad clusters on the volume
rem                       (implies /R)
rem   /scan               NTFS only: Runs a online scan on the volume
rem   /forceofflinefix    NTFS only: (Must be used with "/scan")
rem                       Bypass all online repair; all defects found
rem                       are queued for offline repair (i.e. "chkdsk /spotfix").
rem   /perf               NTFS only: (Must be used with "/scan")
rem                       Uses more system resources to complete a scan as fast as
rem                       possible. This may have a negative performance impact on
rem                       other tasks running on the system.
rem   /spotfix            NTFS only: Runs spot fixing on the volume
rem   /sdcleanup          NTFS only: Garbage collect unneeded security descriptor
rem                       data (implies /F).
rem   /offlinescanandfix  Runs an offline scan and fix on the volume.
rem   /freeorphanedchains FAT/FAT32/exFAT only: Frees any orphaned cluster chains
rem                       instead of recovering their contents.
rem   /markclean          FAT/FAT32/exFAT only: Marks the volume clean if no
rem                       corruption was detected, even if /F was not specified.

rem The /I or /C switch reduces the amount of time required to run Chkdsk by
rem skipping certain checks of the volume.
</pre>

<p>Is there a way I could mass comment code (like <code>""" comment here, can be multiple lines"""</code>in Python?)</p>

<p>This is easy to do if you use Vim:</p>

<ol>
<li>Move to the first column of the first line you want to comment.</li>
<li>Press <code>&lt;C-v&gt;</code> (<kbd>Ctrl</kbd>+<kbd>V</kbd>) to enter block select mode.</li>
<li>Move the selection to the first column of the last line you want to comment.</li>
<li>Type <code>Irem&lt;esc&gt;</code> (Insert, type rem, back to normal mode).</li>
</ol>

<p>Alternatively, since you seem to be familiar with Python, you could pipe it through this script, then copy the output:</p>

<pre><code>import sys
for line in sys.stdin:
    sys.stdout.write("rem " + line)
</code></pre>

<p><code>CHKDSK /? | python3 comment.py</code></p>

python windows comments command-prompt