Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using find command in ms dos batch file 1

Status
Not open for further replies.

UncleScooby

Programmer
Jun 1, 2001
30
GB

Can the find command be used to locate variable content ?

e.g.

find "fixed content" c:\logs\test.log > c:\logs\new.log

works fine but when I substitute the fixed content with a variable
e.g.

find %Date% c:\logs\test.log > c:\logs\new.log

I get a find format error. Any help appreciated.
 
>[tt]find %Date% c:\logs\test.log > c:\logs\new.log[/tt]
Try this?
[tt]find [red]"[/red]%Date%[red]"[/red] c:\logs\test.log > c:\logs\new.log[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top