LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-13-2004, 04:14 PM   #1
naijaguy
Member
 
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, 04:22 PM   #2
david_ross
Moderator
 
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, 05:17 PM   #3
naijaguy
Member
 
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, 06:51 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
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, 09:39 AM   #5
naijaguy
Member
 
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, 12:12 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

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


Reply


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 06:15 AM
Linux box calling a batch script on a windows box to run? Is it possible? joelhop Programming 8 05-17-2004 05: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 08:06 AM
backing up linux with a batch file... RaVensRealm Linux - Newbie 6 04-16-2003 09:59 PM
Like MS-DOS batch file but for Linux? rverlander Programming 2 06-23-2002 03:51 PM


All times are GMT -5. The time now is 05:46 PM.

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