Adam Hair wrote:Ron Murawski wrote:Adam Hair wrote:
Ron wrote:Why not redirect standard output?
At a Windows command prompt, this is done like this:
Code:
program -param1 -param2 >>filename.extension
Ron
Funny enough, I could not do it the way Ron said to do it (

), but
I made the following batch file and it worked:
Thanks Neil and Ron
Adam
I was trying to show you the general case. In your specific case: the 'program' was:
eco2pgn.py
there was only one parameter, '-param1', needed:
scid.eco
and your redirected file was:
eco.pgn
I didn't bother with that stuff because I thought you needed to know about the redirect characters:
>>
It's impossible to guess other people's expertise. You were bright enough to guess what I meant, though!
Ron
I also could not make c:\filepath\eco2pgn.py scid.eco >>eco.pgn work,
by which I mean redirect to eco.pgn. I have had trouble a few other
times in the past running programs from the command line. There must
be something I am not doing right. However, every time I have had
trouble with the command line, I have been able to write a batch file
as a work around.
As far as my expertise goes, it is miniscule. Most of what I have learned
has been from mimicking what I have seen in other people's batch files
and instructions and then figuring out what I did wrong when something
does not run properly. I was really happy when you said to redirect the
output. I sort of knew what was going on, but I lacked the proper term
( redirect ) to find the info I needed on Google.
Thanks again Ron.
Adam
Hi Adam,
I think that your commandline worked perfectly but you were unable to find the
resulting file. The file will wind up in your current working directory, not in
the 'c:\filepath\' directory. In order to get it to work as you expect you need
to fully specify your paths:
c:\filepath\eco2pgn.py scid.eco >>c:\filepath\eco.pgn
This will work no matter which directory you run the program from. Alternately,
you can change directory into the eco2pgn.py directory and then it will become
the cwd (current working directory) and your original syntax will work.
I suspect that you put your batch file into the same directory as the python
program, so the output file was exactly where you expected it to be. Try
searching your drive for eco.pgn. You will probably find it in:
C:\Documents and Settings\<username>
I'm happy to help you out. There's not as much information these days about
commandline syntax as there was back in the days of DOS.
Ron