Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: autoexec.bat REMarks
SearchString = "This is the text to find" Dir = DirGet() DirChange("c:\") If FileExist("autoexec.xxx") Then FileAttrSet("autoexec.xxx", "r") FileDelete("autoexec.xxx") EndIf FileRename("autoexec.bat", "autoexec.xxx") InputFile = FileOpen("Autoexec.xxx", "Read") OutPutFile = FileOpen("Autoexec.bat", "WRITE") Line = FileRead(InputFile) While Line != "*EOF*" If StrIndex (Line, SearchString, 1, @FWDSCAN) Then CheckRem = StrUpper(StrSub(Line, 1, 3)) If CheckRem != "REM" Then Line = StrCat("REM ", Line) EndIf EndIf FileWrite (OutPutFile, Line) Line = FileRead(InputFile) EndWhile DirChange(Dir)
Article ID: W12889
Filename: How to Add REM lines to Autoexec.bat File.txt
File Created: 1999:04:15:16:50:20
Last Updated: 1999:04:15:16:50:20