Simple bat file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Simple bat file
# 1  
Old 08-14-2009
Simple bat file

Hi guys,

I need a *.bat to run a ksh file in the shell on Windows NT...nothing more Smilie How do I do it? I tried with the following but it failed:
Code:
set INFORMIXDIR=D:\user-applications\informix
set PATH=%INFORMIXDIR%;%PATH%

D:\user-applications\MKS\mksnt\sh.exe  C:\hk_9.2\C3_weekly_auto.ksh
exit

Although I'm not sure what the first two parts are as I just copied the only other bat file on the machine and changed the exe to korn shell & the file to my script.

Thanks
# 2  
Old 08-14-2009
The 1st 2 are just a path setting for an environment to the location of Informix DB files.

Whatever this is
Code:
D:\user-applications\MKS\mksnt\sh.exe

make sure that it is a shell that can work your shell script.

If you have any error output, might want to post it.
# 3  
Old 08-14-2009
It says "could not start" in the "scheduled task" section. It did the same thing when I commented out (:Smilie the main line meaning that all that was left was the path settings & exit

It also says it when removing the line completely.
# 4  
Old 08-14-2009
Quote:
It says "could not start" in the "scheduled task" section.
This sounds more like a windows problem or a problem of this sh.exe, not of a shell scripting problem.
I don't know this sh.exe. First make sure, as said, it is a working shell, compatible to the script you feed it with.
Maybe start testing with a simple defining of a variable and echoing it. Or just call that sh.exe without any parameters and then add more tasks to it.
# 5  
Old 08-14-2009
Hi, looking at my graphs in APEX part of the process has been carried out but I haven't received an email. This is due to where I've located the procedure though so all is good now. Thanks =)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with bat file!!!

I need to put/get files from Windows machine to Unix machine and vice-versa. I wrote a text file "ftp1.txt" as below. naga naga06 cd /root/Naga prom off get time.unl bye I wrote another bat file "ftp.bat" as below. ftp -n -s:C:\Users\Naga\Desktop\ftp1.txt IP_ADDRESS but... (2 Replies)
Discussion started by: Naga06
2 Replies

2. Windows & DOS: Issues & Discussions

Executing .bat file

Hi , I have a bat file on windows machine ,I need to excute it from my local unix machine using sambe utility.Is there any comman to execute the .bat file remotely. Using samba utility i can post files to and fro from windows to unix but i don't comman to exute the .bat file. can any one... (2 Replies)
Discussion started by: Raamc
2 Replies

3. Shell Programming and Scripting

Run cygwin in .bat file

Hello everyone, I've written quite a few AWK scripts to run in cygwin and now, I would like to run them one after the other in a .bat file. The problem is, I tried modifying the .bat file used to run cygwin in the first place, but whenever I change something, it doesn't work. The PATH is set up... (3 Replies)
Discussion started by: Teroc
3 Replies

4. Windows & DOS: Issues & Discussions

bat file to connect UNIX server.

Hi, i am trying to connect to unix server from windows bat file using telnet command. But bat file is unable to pass username and password hence could not login to UNIX. My requirement is to connect UNIX server from .bat file and run few macros at a perticular schedule. My UNIX login does... (1 Reply)
Discussion started by: rahulbahulekar
1 Replies

5. Windows & DOS: Issues & Discussions

bat file opening multiple IE windows

I'm trying to open multiple IE windows and enter the same text and press <enter> on each. Here's an example with what I have so far. REM Open @echo on start http://10.1.1.1 ping 1.1.1.1 -n 5 -w 1000 >nul @echo password start http://10.1.1.2 ping 1.1.1.1 -n 5 -w 1000 >nul @echo password... (2 Replies)
Discussion started by: Pitt
2 Replies

6. Shell Programming and Scripting

how to call a .bat file using KSH

Hi all, I am a very new user for korn scripting and in a process of learning. i have a .bat file that calls a .vbs file which calls a macro used to convert an excel spread sheet to .csv file... Now i want to automate this process. I want to call this bat file using a korn script or a korn... (16 Replies)
Discussion started by: bhagya2340
16 Replies

7. Windows & DOS: Issues & Discussions

one question for .bat file

Hi! I'm very sorry for such simple and silly question but I cannot answer it by myself. Can you please help me? In .bat file I should run the C program which is in other directory, and the input configuration file is in this directory too. This dir name is in dirRun variable. The... (3 Replies)
Discussion started by: Anta
3 Replies

8. Windows & DOS: Issues & Discussions

Need solution for Bat FIle using FOR Cycle

Hi people. Don't know if you could help me, but here it goes anyway. I need to search for some directories, and if i for any file founded a must run another Bat file. Can this be done in DOS ? Thanks in advance (1 Reply)
Discussion started by: osramos
1 Replies

9. Shell Programming and Scripting

awk,gawk in bat file

Hi. I'm trying to convert bat file into shell script. Bat file invokes awk file in one section: c:\upg\exe\gawk -f c:\upg\awk\gen_sae.awk -v OP=C:\\upg\\lod\\... ...c:\upg\ref\saaxi.ref c:\upg\log\SAAEPWO.log c:\upg\ref\saaepref.log First of all I issued unix2dos command on that awk file.... (0 Replies)
Discussion started by: andrej
0 Replies

10. UNIX for Dummies Questions & Answers

Need to create .bat file to store log file

Hi guys. Can someone point me to a resource that explains this? Basically these are websphere logs that need to be stored daily, I'm on sunOS 5.8. Each new file stored could have the current time as its filename. The script could be run on a cron which I can set up. I'm just not sure how to write... (0 Replies)
Discussion started by: dirtybrown
0 Replies
Login or Register to Ask a Question