Pages

Tuesday, October 9, 2012

How to get today's date on log file name ? ( Windows & Linux )


For Windows:

C:\test> echo "SUCCESS" > SAMPLE_%date:~0,3%.LOG             
C:\test> dir                                                 
10/17/2012  01:18 PM                12 SAMPLE_Wed.LOG         

C:\test> rman @c:\rman_bkp.sql >                             c:\rman_bkp%date:~10,4%%date:~7,2%%date:~4,2%.log