Welcome Guest.   Make a donation to an author on the site July 31, 2014, 06:28:32 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Passing text to batch file.  (Read 4337 times)
brimstone
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« on: April 03, 2008, 08:58:26 PM »

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?
Logged
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« Reply #1 on: April 03, 2008, 11:25:44 PM »

I am curious to know the answer to your question as well smiley sorry no help here
Logged
brimstone
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #2 on: April 03, 2008, 11:56:03 PM »

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.
Logged
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« Reply #3 on: April 04, 2008, 12:01:53 AM »

Is this adding to the end or beginning?
Logged
brimstone
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #4 on: April 04, 2008, 12:05:35 AM »

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

Logged
kartal
Supporting Member
**
Posts: 1,529


View Profile Give some DonationCredits to this forum member
« Reply #5 on: April 04, 2008, 12:17:58 AM »

Sorry, I was asking if your arguments were writing to the end of the text file or beginning of the text file.
Logged
rjbull
Charter Member
***
Posts: 2,737

View Profile Give some DonationCredits to this forum member
« Reply #6 on: April 04, 2008, 03:31:17 AM »

brimstone,

I take it you're talking about the LOGECHO.COM in Horst Schaeffer's freeware batch file enhancer collection PBATS?

Logged
brimstone
Supporting Member
**
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #7 on: April 04, 2008, 08:03:40 AM »

brimstone,

I take it you're talking about the LOGECHO.COM in Horst Schaeffer's freeware batch file enhancer collection PBATS?



That I am. It allows much better control over the time and date format compared to the %TIME% AND %DATE% variables.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.035s | Server load: 0.08 ]