Batch file for comparing strings - TechRepublic
Question
January 13, 2009 at 09:05 PM
zendainc

Batch file for comparing strings

by zendainc . Updated 17 years, 4 months ago

Hi I am currently trying to create a batch file to read text from a file, display it on the screen updating it every 2 seconds and beep if it finds something new, I have been able to get it to do everything except compare strings and google has yielded no results. So far in order to read and display the data I have the following

@echo off
color f9
title Service Desk – Significant Incident Feed
:start
cls
echo.
echo.
echo Significant Incidents currently open as of
echo.
date /t
time /t
echo.
echo.
echo.
echo.
type “text.txt”
Ping.exe localhost -n 2 >NUL
echo.
echo.

GOTO start

pause

Could anyone advise how I might be able to make it write the input to a string, compare the strings then beep if they do not match.

This discussion is locked

All Comments