Need Help in Windows scripting

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Need Help in Windows scripting
# 1  
Old 06-27-2012
Need Help in Windows scripting

Dear Expert,

Below code is for to take the backup of database by daily time stamp. I need vital help to make my script automatic sending me email if it sucess or fail.


PHP Code:
Code:
  echo 
on
@REM Seamonkey’s quick date batch (MMDDYYYY format)
@REM Setups %date variable
@REM First parses monthday, and year into mm ddyyyy formats and then combines to be MMDDYYYY
FOR /"TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B
FOR /"TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /"TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /"TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
SET date
=%dd%%mm%%yyyy%
exp USER/password@alias file='D:\Backup\%date%.dmp' log='D:\Backup\%date%.log  full=N 
I want to put if conditions to check the logfile follwing things are
PHP Code:
Code:       ("error failed ora- warnings terminated" 
if exist send email failed else success.

Thanks in advance.

Thanks You,

---------- Post updated 06-27-12 at 05:44 AM ---------- Previous update was 06-26-12 at 08:26 AM ----------

If any alternative method is also Appreciated.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

C Shell Scripting on SUA windows 7

hi, Even $eType is BSD_8GB echo $eType switch ( $eType ) case BSD_8GB: case BSD_12GB: echo "excuted BSD_8GB & BSD_12GB" breaksw default: echo "default" exit 0 endsw Result always default case printing. Please help.... (5 Replies)
Discussion started by: gthangav
5 Replies

2. Shell Programming and Scripting

Shell scripting on Windows platform

Is there a free unix platform that will allow me to write a shell script on my Windows OS? I have my files on my C: drive and i need to write a script that reads from those files and does some manipulation. Its pretty straightforward in unix commands hence i don't want to write a Java/C++ program... (3 Replies)
Discussion started by: jakSun8
3 Replies

3. UNIX for Dummies Questions & Answers

Need help configuring Active Perl on Windows Vista.: Perl Scripting on Windows

Hi All, Need help configuring Active Perl on Windows Vista. I am trying to install Active Perl on Windows Vista. The version of Active Perl i am trying to install is : ActivePerl 5.10.1 Build 1006 After installing it through cmd, When i try to run perl -v to check the version, i get the... (2 Replies)
Discussion started by: Vabiosis
2 Replies

4. Windows & DOS: Issues & Discussions

Windows Scripting

I have been involved with shell programming now for the last 5 or 6 years. I am directing my career towards IT Security and need to broaden my experience. I would like suggestions for a good programming language for Windows. Is there a Windows scripting language that is considered secure ? Has... (3 Replies)
Discussion started by: sunsysadm2003
3 Replies

5. Windows & DOS: Issues & Discussions

windows scripting for a batch job

I have been doing unix scripting for quite awhile and there seems to be a wealth of information on it. Now I am working on migrating an intel based application to a new server. I need to modify some existing scripts, but am having trouble finding information on windows scripting, a forum similar... (2 Replies)
Discussion started by: MizzGail
2 Replies
Login or Register to Ask a Question