Calling another file from a .bat file issue

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
pattere
Posts: 2
Joined: 13 Oct 2009 08:20
Location: NW Kansas

Calling another file from a .bat file issue

#1 Post by pattere » 13 Oct 2009 08:53

In my company's check printing process, which has been altered, we need to call a batch file on a server to run from another server.

Here's the gist of the process:
1. Checks are sent from our ERP system to the printer.
2. The check formatting/processing application is polling the system for the file(s), and grabs them.
3. The raw data is processed into our specific format to be printed.
4. All the processed data is then sent to the printer, and to another server to be archived via an imaging system.
5. Here's the issue--A batch file on the first server is used to call a batch file on the imaging server to process the the data into images.

Here is the the file used to call the remote .bat:
cd ..\..\
cd "Program Files\PSTools"
psexec \\imagenow \\imagenow\e$\inserver6\script\RTS_ImportChecksAndUpdateCheckNum.bat

**psexec is a part of pstools to run processes on remote systems.

If I run this .bat manually, the .bat file runs correctly on the remote server.

If someone has an idea about getting this to run the remote process, please let me know. If there is a better way to script it, I am open to that as well.

gianniiiii
Posts: 5
Joined: 15 Oct 2009 05:00

#2 Post by gianniiiii » 15 Oct 2009 05:05

Hy Pattere, have you tried using CALL o START?

Example

call psexec \\imagenow \\imagenow\e$\inserver6\script\RTS_ImportChecksAndUpdateCheckNum.bat

or

start psexec \\imagenow \\imagenow\e$\inserver6\script\RTS_ImportChecksAndUpdateCheckNum.bat


Max

pattere
Posts: 2
Joined: 13 Oct 2009 08:20
Location: NW Kansas

Working on that

#3 Post by pattere » 15 Oct 2009 13:07

I am looking into using a CALL or START. I do not mess with this kind of thing very often, so it may take a little work to get it to work.

The psexec command is what I was using to call the remote .bat file. I have tried this:

CALL \\imagenow\e$\inserver6\script\RTS_ImportChecksAndUpdateCheckNum.bat

It did not seem to work. I need to put a pause in it to see if it is throwing an error.

gianniiiii
Posts: 5
Joined: 15 Oct 2009 05:00

Re: Working on that

#4 Post by gianniiiii » 16 Oct 2009 01:03

pattere wrote:I am looking into using a CALL or START. I do not mess with this kind of thing very often, so it may take a little work to get it to work.

The psexec command is what I was using to call the remote .bat file. I have tried this:

CALL \\imagenow\e$\inserver6\script\RTS_ImportChecksAndUpdateCheckNum.bat

It did not seem to work. I need to put a pause in it to see if it is throwing an error.


Hy pattere, so it should be a permission Issue. check wich user launch the batch.

I Mean, if you have a scheduled task check if the user that launch the task is a user enable to act over imagenow server.

Post Reply