Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 116 Posts 28 Joined 2007-01-03 05:21 19-year member UID 75318 Gender Male
Status Offline
@Echo OFF
::
:: BatName: AddBatHead.bat
:: Version: 0.1
:: Purpose: Add a comment header to BAT files
::
:: Usage: AddBatHead BatFile
:: BatFile bat file who what head.
:: LineNumber where to insert. *default is 0
::
::
:: sed.exe
::
:: Code by SpikeKnox 2007.01.20
::
rem Show help
If == (Type "%~f0" | findstr "^::" && Goto :EOF)
rem %1 BatFile
If NOT EXIST %1 (Type "%~f0" | findstr "^::" && Goto :EOF)
rem %2 LineNumber
If == ( Set line=0 ) Else ( Set line=%2 )