Calling another Perl script (on UNIX) from a script on Windows NT 
Author Message
 Calling another Perl script (on UNIX) from a script on Windows NT

Hello!

    I am using ActiveState's ActivePerl on Windows NT 4 most of the
time.  I am not having a need of calling a Perl script on UNIX box from
my Perl script on my Windows NT machine.  The purpose is to FTP (upload)

a file from local machine to one of our server.  On the server, the
script will check for file duplication.  If the upload file's filename
has already been used, the current file with the same filename will be
renamed appending suffix (01, 02, etc.)

    The script on NT is simply a function to use NET::FTP to upload the
file to the server and call the script on the server to finish the
process.  Whereas, the main thing is, I don't know where to start for
the NT script to call the one on our UNIX server.

    Any help is appreciated!

--

***************************************

NetZero, Inc.



Fri, 30 Nov 2001 03:00:00 GMT  
 Calling another Perl script (on UNIX) from a script on Windows NT

Quote:
>the NT script to call the one on our UNIX server.

For remote jobs use Net::rexec

Alternatives to what you are trying to do:
1 - On the UNIX server run a scheduled job (CRON) to check for duplicate
files
2 - If NT has access to the Unix file system (NFS, SAMBA), have the NT
script check for duplicate files.

Cheers,
Adrian

Hypertech Pacific Group Taiwan
4F-1, #28, Lane 28, Hsing-Chung Rd.
Nankang, Taipei 115, Taiwan R.O.C.
tel: +886-2-2653 3922   fax: +886-2-2653 3920
web site: http://www.hypertech.com.tw
english company profile: http://www.hypertech.com.tw/ht_prf_c.htm



Sat, 01 Dec 2001 03:00:00 GMT  
 Calling another Perl script (on UNIX) from a script on Windows NT

Quote:
>Hello!

>    I am using ActiveState's ActivePerl on Windows NT 4 most of the
>time.  I am not having a need of calling a Perl script on UNIX box from
>my Perl script on my Windows NT machine.  The purpose is to FTP (upload)

>a file from local machine to one of our server.

At work, we have several OpenBSD computers along with a bunch of Windows
based computers. Making a long story short, a specific activity on one of
the Windows computers will trigger a Perl script on one of the OpenBSD
computers. However, I used the KISS method. :) Samba is running on the
OpenBSD computer, and one of its shares is mapped as a network drive on the
Windows computer. A certain action on the Windows computer will cause it to
write a "semaphore" file on the OpenBSD's share. A background script
running on OpenBSD monitors the share for the existance of the semaphore
file, and will run a Perl script "if" so. It's a very easy way to do it.
Hope this gives you some ideas!

--

---------------------------
Dana Booth <dana[at]oz.net>
Tacoma, Wa., USA
---------------------------



Sun, 02 Dec 2001 03:00:00 GMT  
 Calling another Perl script (on UNIX) from a script on Windows NT
Then again ,as yet another alternative to check for duplicates when
uploading files: use FTP ls and rename commands, so evertyhing can be
handled from the uploader's side.

Adrian

Hypertech Pacific Group Taiwan
4F-1, #28, Lane 28, Hsing-Chung Rd.
Nankang, Taipei 115, Taiwan R.O.C.
tel: +886-2-2653 3922   fax: +886-2-2653 3920
web site: http://www.hypertech.com.tw
english company profile: http://www.hypertech.com.tw/ht_prf_c.htm


Quote:

>>the NT script to call the one on our UNIX server.

>For remote jobs use Net::rexec

>Alternatives to what you are trying to do:
>1 - On the UNIX server run a scheduled job (CRON) to check for duplicate
>files
>2 - If NT has access to the Unix file system (NFS, SAMBA), have the NT
>script check for duplicate files.



Sun, 02 Dec 2001 03:00:00 GMT  
 Calling another Perl script (on UNIX) from a script on Windows NT
With this method in mind, the script could be uploaded to the unix box via
ftp, then launched
by a cron job.  A semaphore file (the script itself perhaps) could be
removed to signal
completion of the script - no particular need exists to use either samba or
nfs.

If, however, the file to be uploaded is the one which must be renamed -
AND - it is guaranteed
that only the one win machine is uploading these files - it seems simplest
to script the entire process to run on the win box: Take a listing of the
upload directory.  Pipe the listing to a script which identifies and
resolves the file name conflict by renaming the file before uploading.
Upload the file with the new name to the BSD box.

Regards, Dennis Reichel

Quote:
> >    I am using ActiveState's ActivePerl on Windows NT 4 most of the
> >time.  I am not having a need of calling a Perl script on UNIX box from
> >my Perl script on my Windows NT machine.  The purpose is to FTP (upload)
> >a file from local machine to one of our server.

> At work, we have several OpenBSD computers along with a bunch of Windows
> based computers. Making a long story short, a specific activity on one of
> the Windows computers will trigger a Perl script on one of the OpenBSD
> computers. However, I used the KISS method. :) Samba is running on the
> OpenBSD computer, and one of its shares is mapped as a network drive on
the
> Windows computer. A certain action on the Windows computer will cause it
to
> write a "semaphore" file on the OpenBSD's share. A background script
> running on OpenBSD monitors the share for the existance of the semaphore
> file, and will run a Perl script "if" so. It's a very easy way to do it.
> Hope this gives you some ideas!



Tue, 04 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Calling another Perl script (on UNIX) from a script on Windows NT

2. CGI, Perl, NT: Calling a script from a script

3. Converting from Unix script to an NT script

4. Calling unix programs from a perl script / Internal Server Error

5. Perl system call to UNIX-based script failing

6. Calling a Unix Function from a Perl Script

7. Calling Perl scripts inside HTML file within a Windows environment

8. how to call perl script in Windows 95

9. Unix Perl Script ported to NT problem

10. NEWBIE Question: Perl Script in Unix vs. NT

11. Porting Unix Perl scripts to Win NT

12. move from Unix to NT - - MSQL to Perl scripts broken

 

 
Powered by phpBB® Forum Software