ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

Passing text to batch file.

(1/2) > >>

brimstone:
While I like the addnote and viewnote features of FARR2, I prefer more condensed information in my log files. I'm sure this is easy to do, but I can't seem to find out how to do it.

I've got a batch file in a directory that does exactly like addnote. I want to be able to run it and pass text to it from FARR.

echo %DATE% %TIME% Hello There!>>logfile.txt

How would I set it up in FARR to pass the text between %TIME% and >> ("Hello There!" in this case) to a batch file?

kartal:
I am curious to know the answer to your question as well :) sorry no help here

brimstone:
Actually, I figured out a solution without having a separate batch file.

znote1 $$1 | D:\Logfile\LOGECHO.COM $W $M/$D/$Y $h:$m - $$1>>logfile.txt

LOGECHO is a simple DOS program that lets me have more control over the date and time outputs.

So typing "znote1 Hello World!" into FARR results in:

Thu 04/03/08 23:52 - Hello World!

being added to logfile.txt in the same directory as LOGECHO.

You could also do the same using the parameters from my original post, except use cmd.exe instead of LOGECHO.

kartal:
Is this adding to the end or beginning?

brimstone:
Not sure what you mean, but I've attached a screenshot of my custom alias.

Navigation

[0] Message Index

[#] Next page

Go to full version