I’m trying to run Lynx in a batch file and I’m able to do it given the batch file itself is in the same directory as Lynx is, however, I want to be able to run the batch file in a different directory and doing so has been problematic…
Here’s the code I have in my batch file:
lynx -source http://website.com/page.php
In order to run this puppy outside of the Lynx directory, do I have to create an Environment variable or a System variable on an XP machine?
Thanks for the suggestion, Dan, but that doesn’t seem to work either. When I try it, it looks like it tries to run but immediately terminates with the following message:
The configuration file ./lynx.cfg is not available.
Seems to me that the executable (or attributing files therein) have been hard-coded somehow to cause this.
In that case, adding Lynx’s directory to your PATH is probably the thing to do next. It’s under system variables and will already exist, you just add a semicolon and the new directory to the end of the current value.
Tried it with both the Environment and System using the Variable Name of “lynx” and the Variable Value of the following:
C:\…\directory_where_lynx_is
C:\…\directory_where_lynx_is\
C:\…\directory_where_lynx_is\lynx.exe
None of the above worked. The copy of Lynx that I have can be found here. (It’s the old & stable version.) It’s also a stand alone version… Would this have anything to do with any of this?
Hey Dan, a guy on that other forum found a directory where there was a sample batch file. This directory is in the Lynx folder (ironically) and has the code I needed–just had to open up the sample batch file in the text editor to see it. Thanks again for your help, though.
Just for helping other users, all what they must doing is to add next lines of code just before calls to lynx.exe @echo off
SET PATH=%PATH%; [path to lynx folder]
SET lynx_cfg=[path to lynx folder]\lynx.cfg
…