Increase & replace nub in Bat script Automatic When executed
Posted: 06 Mar 2013 07:30
Hi,
Sub: Increase & replace numbers in Bat script Automatically When ever Batch file executed
Need your kind help on below scenario.
> Created One Bat File Named as "Sample.bat"
> Let us Assume, The Bat file is executed on 2013/02/28
> The script in the Bat File as in below
> Script Execution Started By clicking the "Sample.Bat"
Start D:\Sample.exe -Start Date 2013/01/01 -End Date 2013/02/28
> Execution completed
> Then My requirement Is:
> After execution it automatically Dates should be replaced as "-Start Date 2013/03/7 -End Date 2013/03/14 " and remaining code is should be same, As shown in below.
Start D:\Sample.exe -Start Date 2013/03/7 -End Date 2013/03/14
-----------------------------------------------------------------
2nd Time executing Bat File.
> Script Execution Started By clicking the "Sample.Bat"
Start D:\Sample.exe -Start Date 2013/03/7 -End Date 2013/03/14
> Execution completed
> Then My requirement Is:
> After execution it automatically Dates should be replaced as "-Start Date 2013/03/14 -End Date 2013/03/21 " and remaining code is should be same, As shown in below.
Start D:\Sample.exe -Start Date 2013/03/14 -End Date 2013/03/21
----------------------------------------------------------------------------------
3rd Time executing Bat File.
> Script Execution Started By clicking the "Sample.Bat"
Start D:\Sample.exe -Start Date 2013/03/7 -End Date 2013/03/14
> Execution completed
> Then My requirement Is:
> After execution it automatically Dates should be replaced as "-Start Date 2013/03/21 -End Date 2013/03/28 " and remaining code is should be same, As shown in below.
Start D:\Sample.exe -Start Date 2013/03/21 -End Date 2013/03/28
--------------------------------------------
Note: The Dates should increased to next 7 days
Any Logic to implement this.
Greatly Appreciated
Thanks in advance
Regards,
ASR
Sub: Increase & replace numbers in Bat script Automatically When ever Batch file executed
Need your kind help on below scenario.
> Created One Bat File Named as "Sample.bat"
> Let us Assume, The Bat file is executed on 2013/02/28
> The script in the Bat File as in below
> Script Execution Started By clicking the "Sample.Bat"
Start D:\Sample.exe -Start Date 2013/01/01 -End Date 2013/02/28
> Execution completed
> Then My requirement Is:
> After execution it automatically Dates should be replaced as "-Start Date 2013/03/7 -End Date 2013/03/14 " and remaining code is should be same, As shown in below.
Start D:\Sample.exe -Start Date 2013/03/7 -End Date 2013/03/14
-----------------------------------------------------------------
2nd Time executing Bat File.
> Script Execution Started By clicking the "Sample.Bat"
Start D:\Sample.exe -Start Date 2013/03/7 -End Date 2013/03/14
> Execution completed
> Then My requirement Is:
> After execution it automatically Dates should be replaced as "-Start Date 2013/03/14 -End Date 2013/03/21 " and remaining code is should be same, As shown in below.
Start D:\Sample.exe -Start Date 2013/03/14 -End Date 2013/03/21
----------------------------------------------------------------------------------
3rd Time executing Bat File.
> Script Execution Started By clicking the "Sample.Bat"
Start D:\Sample.exe -Start Date 2013/03/7 -End Date 2013/03/14
> Execution completed
> Then My requirement Is:
> After execution it automatically Dates should be replaced as "-Start Date 2013/03/21 -End Date 2013/03/28 " and remaining code is should be same, As shown in below.
Start D:\Sample.exe -Start Date 2013/03/21 -End Date 2013/03/28
--------------------------------------------
Note: The Dates should increased to next 7 days
Any Logic to implement this.
Greatly Appreciated
Thanks in advance
Regards,
ASR