Home Man
Search
Today's Posts
Register

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

Need Help in Windows scripting

Login to Reply

 
Thread Tools Search this Thread
# 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 to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
C Shell Scripting on SUA windows 7 gthangav Shell Programming and Scripting 5 10-15-2012 08:21 AM
Shell scripting on Windows platform jakSun8 Shell Programming and Scripting 3 08-18-2010 04:53 AM
Need help configuring Active Perl on Windows Vista.: Perl Scripting on Windows Vabiosis UNIX for Dummies Questions & Answers 2 03-20-2010 05:57 PM
Windows Scripting sunsysadm2003 Windows & DOS: Issues & Discussions 3 01-12-2008 04:43 AM
windows scripting for a batch job MizzGail Windows & DOS: Issues & Discussions 2 03-30-2007 06:42 PM


All times are GMT -4. The time now is 02:38 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password