Step 1) Make a directory called "moved"
D:\>mkdir D:\app\oracle\admin\orcl\Adump\moved
Step 2) Create a batch file mv_trc.bat and copy the below content to this batch file.
D:
cd \app\oracle\admin\orcl\Adump
forfiles /S /D -365 /C "cmd /c move @file D:\app\oracle\admin\orcl\Adump\moved"
----Above forfiles command will move the all the trace files created 365 days before to the said location---
Step 3) Scheduled the task from window scheduler with below details.
Create a Basic Task and should be run as high privelege.
PARAMETERS:
ACTION: C:\Users\ashwani\Desktop\mv_trc.bat
D:\>mkdir D:\app\oracle\admin\orcl\Adump\moved
Step 2) Create a batch file mv_trc.bat and copy the below content to this batch file.
D:
cd \app\oracle\admin\orcl\Adump
forfiles /S /D -365 /C "cmd /c move @file D:\app\oracle\admin\orcl\Adump\moved"
----Above forfiles command will move the all the trace files created 365 days before to the said location---
Step 3) Scheduled the task from window scheduler with below details.
Create a Basic Task and should be run as high privelege.
PARAMETERS:
ACTION: C:\Users\ashwani\Desktop\mv_trc.bat
No comments:
Post a Comment