1.

Solve : display most recent item?

Answer»

How can I MAKE DOS display the last thing that it echoed? For example:

C:/programthatreturnsqwerty.exe
qwerty

How can I make it display "qwerty" again, without running the program? The program returns a different value EVERY time, and I NEED to get that value into a variable named %qwerty%, so that I can return it farther down the line.

Thanks,
-darrylTry this

C:/programthatreturnsqwerty.exe > $temp$
Set /P MyQWERTY=<$temp$
Del $temp$
This works like a charm....... when i'm running it in windows

UNFORTUNATELY, for some reason when I run it on the boot CD that I am using, it doesn't work. It creates the file $temp$ (it appears when i search c:/dir), but it will not plug a value back in. I am suspicious that it keeps creating an empty file, and so when it is supposed to be putting its contents into the variable, it does everything the way it should but unfortunately it's just an empty file. This may not be the case, but it seems likely to me.

Here are my questions:

1) Why does this work fine when I run it in windows, but not fine when I run it off of this boot CD?
2) How can I check the contents of the file $temp$, without running EDIT?
3) How do I make this thing work?

It's driving me nuts...

Thanks,
-darryl



Discussion

No Comment Found