LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   call program on linux box from windows batch file (https://www.linuxquestions.org/questions/programming-9/call-program-on-linux-box-from-windows-batch-file-217260/)

naijaguy 08-13-2004 03:14 PM

call program on linux box from windows batch file
 
I have a simple .bat script file on Windows that calls an FTP program to move some files over the internet and then calls another program to process the files. I've just moved that program for processing the files onto a computer running Red Hat 8.0 that isn't connected to the internet (just the internal network), so I still need to begin this job on the Windows machine (for the FTPing over the internet). Is it possible for me to do something at the end of my .bat file to somehow call that program on the Linux box, or is my only recourse to schedule the job on the Linux box to run after the FTPing on the Windows box? (Right now we have it set up so that the Linux box can see a bunch of shared drive on the Windows machine, so if I ran the program from the Linux machine and left the data on the Windows machine, my Linux box should be able to access those files). Thanks...

david_ross 08-13-2004 03:22 PM

You may be able to do it by mapping a samba share and using the "preexec" option in the share

naijaguy 08-13-2004 04:17 PM

I just ran across this daemon called inetd. It seems like if I could run something on my Windows machine that could send a message to a port number on the Linux one then it could work for me...

chrism01 08-14-2004 05:51 AM

One way to avoid having to get into sockets is to have the Linux prog run as a daemon (or run from cron), then have your Win prog leave a small (1 char) signal file when its finished and wants the Linux prog to run. The linux prog checks for this and does it's stuff if it finds it, then removes the signal file.
Avoids overlapping processes.

naijaguy 08-14-2004 08:39 AM

I know how to get Linux to see Windows by mounting drives, but how do you get Windows to see a Linux machine's file system?

jlliagre 08-14-2004 11:12 AM

Samba contains both client and server support, so there is no problem sharing a linux file-system to windows machines.


All times are GMT -5. The time now is 01:34 PM.