The first person to give me the proper syntax to use shell() to read a text file (using MS-DOS) and save the output as either a variable or a file in the current game directory, will get a free subscription to the library I am creating using this same shell command. It'll be worth the minute it takes to answer, trust me.
(I probably knew this at some point before, but I forgot 1) what MS-DOS command outputs a file directly to the MS-DOS window, and 2) what syntax is used in MS-DOS to send the screen output to a text file... essentially logging screen output.)
~Polatrite~
ID:153472
Jan 6 2004, 8:48 pm
|
|
I've actually been toying with this for a while.
shell("type c:\\exampledir\\examplefile.txt > exampleoutput.txt") I open my DreamSeeker, authorize the command to run, and it returns null and no exampleoutput.txt files are created on the harddisk anywhere. Does anyone know how shell works, and why it won't do this for me? |
In response to Polatrite
|
|
hmm... if you runjust Shell() (with no arguments) does it return true?
|
In response to Grei
|
|
Yes.
code: usr << shell() output: 1 |
In response to Polatrite
|
|
Thanks to Grei, we got the entire thing sorted out by using runtime-created batch files. I have one more question, though. Is there a way to terminate a finished batch file window after it's all done? Exit doesn't work.
|
In response to Polatrite
|
|
Probably not. Either it's a security feature of sorts (so people have a harder time running commands without you knowing it) or it's just like that for no reason. =)
|
In response to Polatrite
|
|
Try quit, that works in shell.
(Err, to avoid confusion, when I say shell I mean accessing and running another computer via SSH.) |
In response to Polatrite
|
|
Might try to create a PIF file (right-click on your batch file from Windows and set the parameter to close the window after the program has finished executing)...and see if you can get shell to start the pif file.
|
1) type filename
2) type filename >> newfilename
Use ">>" to append to the end of an existing file
Use ">" to overwrite or create a new file