Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-13-2004, 03:14 PM   #1
Registered: Aug 2004
Posts: 88

Rep: Reputation: 15
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...
Old 08-13-2004, 03:22 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
You may be able to do it by mapping a samba share and using the "preexec" option in the share
Old 08-13-2004, 04:17 PM   #3
Registered: Aug 2004
Posts: 88

Original Poster
Rep: Reputation: 15
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...
Old 08-14-2004, 05:51 AM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.7, Centos 5.10
Posts: 16,651

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
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.
Old 08-14-2004, 08:39 AM   #5
Registered: Aug 2004
Posts: 88

Original Poster
Rep: Reputation: 15
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?
Old 08-14-2004, 11:12 AM   #6
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,570

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger linux command by windows batch file? mariusak Linux - Networking 6 06-03-2005 05:15 AM
Linux box calling a batch script on a windows box to run? Is it possible? joelhop Programming 8 05-17-2004 04:49 PM
What is the best way to call a Java program from a C prog in Linux? renato soffiatt Programming 1 10-17-2003 07:06 AM
backing up linux with a batch file... RaVensRealm Linux - Newbie 6 04-16-2003 08:59 PM
Like MS-DOS batch file but for Linux? rverlander Programming 2 06-23-2002 02:51 PM

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration