Pre-Requisites :
In Data Files Section Set the properties like
Root Directory : D:\
File Location : $Dynamic_Name
Code in the Script File :
$Dynamic_Name='DYNAMIC_'to_char(sysdate(),'YYYY.MM.DD.HH.MI.SS')'.txt';
exec('D:\dy.bat',$Dynamic_Name,8);
Code in Batch File :
d:
echo %1 > d:\z.txt
type k.txt > %1
Root Directory : D:\
File Location : $Dynamic_Name
Code in the Script File :
$Dynamic_Name='DYNAMIC_'to_char(sysdate(),'YYYY.MM.DD.HH.MI.SS')'.txt';
exec('D:\dy.bat',$Dynamic_Name,8);
Code in Batch File :
d:
echo %1 > d:\z.txt
type k.txt > %1