Batch Files and Server 2008

Hi Guys,

Gotta say i love the scraper. It's helped me out no end with some very complex scrapes recently. As I now have a load of scrapes I need to kick off each each day I need the batch files for the scrapes, in Server 2008 they don't seem to allow the same batch fies as in orther versions of windoze.

Here's what i currently have -

"C:\Program Files (x86)\screen-scraper professional edition" -jar screen-scraper.jar -s "scrape name"

This gives me the error -

"-s is not recognised as an internal or external command"

Using the examples on this site of -

"C:\Program Files \(x86\)\screen-scraper professional edition\jre\bin\java" -jar screen-scraper.jar -s "scrape name"

gives this error -

The system cannot find the path specified (I would expect this as the screen-scraper.jar is not in this directory -actually the directory does not exist, or maybe hidden).

Any ideas team?

I think that this is just a

I think that this is just a question of context.

If your batch file is in the screen-scraper working directory (C:\Program Files \(x86\)\screen-scraper professional edition\), your batch will need:

jre\bin\java -j screen-scraper.jar -s "scrape name"

You should be able to run the batch as any user who can start screen-scraper.

My batch file is not in the

My batch file is not in the working directory, hence I have to give the whole location of the folder. As you can see above I have tried the example used on the site which gives an error. Surely someone must have an idea how to set up the batch file with the right syntax to envoke the scrapes in Server 2008? Scott?

You really should get the

You really should get the batch to work from the screen-scraper working directory so the screen-scraper.jar has all the ancillary files in context. May I ask what happens that you cannot run from within that directory?

Unhide folders

I recommend that you confirm the jre/bin directory exists. Can you unhide all files and folders temporarily to verify this?

-Scott

Fixed!

Hi Scott and Jason,

I have been getting lots of errors in the way i was trying to run the batch files, some java errors, however the following script works perfectly -

cd C:\Program Files (x86)\screen-scraper professional edition

jre\bin\java -jar screen-scraper.jar -s "scrape name"

The other ways just caused errors.

Richard

Not ideal, but if it works

Rich,

That's good to hear that it worked for you. However, for others running Windows Server 2008 that might want to invoke those lines of code programmatically, say, from Windows Task Scheduler they would need it to all work as a batch file.

For future readers of this thread, unfortunately we don't have a copy of Windows Server 2008 to test this scenario on. Given the experience we've had working with Vista here are some recommendations.

- Launch screen-scraper's installer by right-clicking and selecting, "Run as Administrator"
- Install screen-scraper to a directory other than Program Files (eg. your user's home directory)
- Run your batch file from screen-scraper's installation root directory
- As a last resort, set your batch file (and possibly the screen-scraper.exe file) to run in compatibility mode for Windows XP.
- DO NOT attempt to run screen-scraper via any other version of Java installed on your machine other than the version that comes with screen-scraper.

-Scott