The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
.
google unix.com



Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help with running the tar command using system() call in C vsanjit High Level Programming 5 11-10-2008 07:17 PM
command << EOF(dont want to call other script) user_prady Shell Programming and Scripting 4 11-15-2007 04:19 AM
How to call Linux command in C krishna_sicsr High Level Programming 6 09-14-2007 07:00 AM
How to call a Linux command in C prog. krishna_sicsr Shell Programming and Scripting 1 04-08-2007 04:53 AM
how can call perl script as command? umen UNIX for Dummies Questions & Answers 1 10-14-2005 10:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-13-2009
bhagya2340 bhagya2340 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 61
Can rsh command be used to call a bat file

I have a .bat file on windows, which converts a .xls file into .csv file and using a ksh script i would usually FTP this .csv file...

Now i want to trigger this .bat form my ksh script.

can i use rsh command in my FTP to run .bat file on windows and then ftp the generated .csv file...is this possibel..

If so please explain me...

Thanks..
  #2 (permalink)  
Old 01-13-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,866
Nope. Windows usually does not provide any remote administration service that isn't graphics based. You could try to install OpenSSH or Telnet on the Windows server to remote in and start the batch file.
  #3 (permalink)  
Old 01-13-2009
bhagya2340 bhagya2340 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 61
I have Telnet using which i connect to the Unix and do my work...
can you say me more about how i can use telnet, unix to start my batch file
  #4 (permalink)  
Old 01-13-2009
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
You would have to have telnet server running on the windows box and create a script to connect to the windows box and run the script....

Why not just use the windows scheduler.
  #5 (permalink)  
Old 01-13-2009
bhagya2340 bhagya2340 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 61
I dont know when i told my team lead she said no

Ok can i use telent in between ftp to start something on windoes like this
telnet C:\test\bhagya.bat in my FTP
will this start my bat file to work and give me the rewuired out put...
  #6 (permalink)  
Old 01-13-2009
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
FTP will not execute a file on the remote server. FTP is for transferring files, not executing.
  #7 (permalink)  
Old 01-13-2009
bhagya2340 bhagya2340 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 61
Yes... this is my FTP
Code:
FTP_FILE_NAME="LTC*.csv"
FTP_DIR_NAME="ProviderReject"
ONE_MORE="SI_Notification_Reports"
PRESENT_DIR=`pwd`
FTP_STATS="${LOG_DIR}/FTP_Provider_Rej.stats"
FTP_ERR="${LOG_DIR}/FTP_Provider_Rej.error"
ftp -nv ${SI_NOTIFICATION_FTP_IP} > ${FTP_STATS} 2> ${FTP_ERR} <<EOF 
user ${SI_NOTIFICATION_FTP_USER} ${SI_NOTIFICATION_FTP_PASSWORD}
cd ${ONE_MORE}
cd ${FTP_DIR_NAME} 
bin
lcd ${DATA_DIR}
pwd
dir
prompt off
mget ${FTP_FILE_NAME}  
mdelete ${FTP_FILE_NAME}
prompt on
dir
EOF

if [[ -f $FTP_ERR ]] && [[ ! -s $FTP_ERR ]]     
then                                            
  rm -f ${FTP_ERR}                              
fi
here i am going to that location where the bat file is so can i put my telnet statment to run .bat file like this

cd ${ONE_MORE}
cd ${FTP_DIR_NAME}

Here telenet statement to run bat file

bin
lcd ${DATA_DIR}
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0