variable on a log file

Hewlett-packard / Sd2100
February 10, 2009 at 21:49:36
Specs: Windows XP, 1024
how could i go about doing this

set /p %info%= type something to be log
cls
set /p %log%= type name of log.

how would i use the two variables and use whats typed in the info and then log whats typed but use the name of %log% as the log name. i tried but not a clue why it dont work

Thanks
Brock


See More: variable on a log file

Report •


#1
February 10, 2009 at 22:54:55
@echo off

set /p %info%= type something to be log
set /p %log%= type name of log.

> %log% echo %info%


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#2
February 10, 2009 at 23:02:14
how do you get it to output a log file with %log% name?

Report •

#3
February 10, 2009 at 23:05:27
i tested it it came up with a syntax error

Report •

Related Solutions

#4
February 11, 2009 at 00:05:30
LOL I pasted in what you posted. I should know better at my age.

============================================
@echo off

set /p info= type something to log
set /p log= type name of log
> %log% echo %info%


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#5
February 11, 2009 at 08:23:33
man im dumb i forgot thatlol. thanks

how could i go about recalling info that stored from log files?


Report •

#6
February 11, 2009 at 13:41:25
any ideas? also how can i set to ask a question to open a log file that was stored before or recall to add more info.


Thanks


Report •

#7
February 11, 2009 at 17:42:16
how do i when created a log how do i open that log file i created out of many that is created? also how can i recall info from logs created like number for example?

Report •

#8
February 11, 2009 at 19:49:31
If you just want to see what's in the file, use this:

type logname

If you want to set a var:

set /p myvar=<logname


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#9
February 11, 2009 at 20:10:08
well that works but how would i about search a for a log name. i use the varible

set /p %log%=<logname but it closes out. shouldnt.

how do you recall info from txt files ?


Report •

#10
February 11, 2009 at 21:41:46
You said:

set /p %log%=<logname but it closes out. shouldnt.

Do you really mean to use %log%?
Or is it a mistake?
%log% will expand to the content of the
vairable log.
If you want to set a variable by the name log
use:
set /p log=<logname

--
Holla.


Report •

#11
February 12, 2009 at 13:20:02
What i wanted to do is use that and if i was to search for already created logs just type in the log name and have it open.

the %log% that was a mistake on my part.


Report •


Ask Question