BATCH SCRIPT PROGRAMMING 2020
-------------------------------------------------
Sample programme for understanding syntax concept Just copied as it is:-
Automatic zipping files and copied to different directory.
Do not copy and run the programme, just understand the concept of programme.
Dos command for ziping and unziping files
pkunzipn.exe and pkzip.exe -- download these two software from internet.
you have to down load both pkzip and pkunzip for windows 64 bit.
or 7-zip application. Link given here.
https://www.7-zip.org/
@echo onif "%1" == "" goto end
if "%2" == "" goto end
if "%3" == "" goto end
if exist f:\times\btimes\btcity\%3*_bgt_mpr_01*.qxd goto btpg2
if not exist f:\times\btimes\btcity\%3*_bgt_mpr_01*.qxd goto btend
:btpg2
if exist f:\times\btimes\btcity\%3*_bgt_mpr_02*.qxd goto bt1
if not exist f:\times\btimes\btcity\%3*_bgt_mpr_02*.qxd goto bt2msg
:bt2msg
p:\bat\notepad.exe bt2msg.txt
goto btend
:bt1
if exist f:\times\btimes\btcity\%3btimes*.zip goto btend
if not exist f:\times\btimes\btcity\%3btimes*.zip goto zip1
:zip1
xcopy f:\times\btimes\btcity\*.zip f:\times\btimes\btcity\backup /m
echo y| del f:\times\btimes\btcity\*.zip
pkzipn c:\main\%3btimes f:\times\btimes\btcity\*.*
sleep 10 bt ziping
rem echo y|xcopy c:\main\%3btimes*.zip f:\times\btimes\btzip /m
move c:\main\%3btimes*.zip f:\times\btimes\btcity
del c:\main\%1btimes*.zip
if exist f:\times\btimes\btcity\%3btimes*.zip goto btmove
if not exist f:\times\btimes\btcity\%3btimes*.zip goto btend
:btmove
move f:\times\btimes\btcity\*.eps f:\times\btimes\btcity\backup
move f:\times\btimes\btcity\*.qxd f:\times\btimes\btcity\backup
move f:\times\btimes\btcity\*.tif f:\times\btimes\btcity\backup
move f:\times\btimes\btcity\*.xtg f:\times\btimes\btcity\backup
del f:\times\btimes\btcity\*.eps
del f:\times\btimes\btcity\*.qxd
del f:\times\btimes\btcity\*.tif
del f:\times\btimes\btcity\*.xtg
if exist f:\times\btimes\btcity\%3btimes*zip goto msg1
if not exist f:\times\btimes\btcity\%3btimes*zip goto btend
:msg1
@echo "btfiles zipped and sent" > f:\news\btimes.snt
dir f:\times\btimes\btcity\*.zip >> f:\news\btimes.snt
pkunzipn f:\times\btimes\btcity\%3btimes*.zip -v *.qxd >> f:\news\btimes.snt
dir f:\times\btimes\btcity\backup\*.qxd >> f:\news\btimes.snt
:btend
rem bangalore times *********************************end
:end
@echo 1 = today date, 2= day 3=tomorrow date
:etp1
@echo Page one not present
:end
-----------------------------------------------
Do not copy and run the programme, just understand the concept of programme.
Sample programme for understanding syntax concept:
Listing different directory and storing it in one place. To check File received Time.
Note that how I used directory in this file.
if "%1"== "" goto end
if "%2"== "" goto end
m:
cd\olivetoi\ban
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*toibg*_mpr_*_m_*.ps > f:\news\main\stamp\%2toimet
dir \\PUB-OPI\PUBS\TOI\BW\OUT\%2*toibg*_mpr_*_m_*.ps >> f:\news\main\stamp\%2toimet
echo --------------------------------- >> f:\news\main\stamp\%2toimet
dir k:\pageout\blr\out\%2*toibg*_m_*.pdf >> f:\news\main\stamp\%2toimet
m:
cd\olivetoi\mys
dir \\PUB-OPI\PUBS\TOI\BW\OUT\%2*mys*_*.ps > f:\news\main\stamp\%2toimys
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*MYS*.ps >> f:\news\main\stamp\%2toimys
echo --------------------------------- >> f:\news\main\stamp\%2toimys
dir k:\pageout\mys\out\%2*mys*_*.pdf >> f:\news\main\stamp\%2toimys
m:
cd\olivetoi\hbl
dir \\PUB-OPI\PUBS\TOI\HUBLI\OUT\%2*toibg*_h_*.ps > f:\news\main\stamp\%2toihbl
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*toibg*_h_*.ps >> f:\news\main\stamp\%2toihbl
echo --------------------------------- >> f:\news\main\stamp\%2toihbl
dir k:\pageout\hbl\out\%2*toibg*_h_*.pdf >> f:\news\main\stamp\%2toihbl
m:
cd\olivetoi\mgl
dir \\PUB-OPI\PUBS\TOI\MANIPAL\OUT\%2*mang*_*.ps > f:\news\main\stamp\%2toimgl
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*mang*.ps >> f:\news\main\stamp\%2toimgl
echo -------------- ---------------- >> f:\news\main\stamp\%2toimgl
dir k:\pageout\mgl\out\%2*mang*_*.pdf >> f:\news\main\stamp\%2toimgl
m:
cd\olivetoi\nie
dir \\PUB-OPI\PUBS\TOI\BW\OUT\%2*nie*_*.ps > f:\news\main\stamp\%2toinie
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*nie*.ps >> f:\news\main\stamp\%2toinie
echo ------------------------------ >> f:\news\main\stamp\%2toinie
dir k:\pageout\nie\out\%2*nie*_*.pdf >> f:\news\main\stamp\%2toinie
m:
cd\oliveet\ban
dir \\PUB-ETPDF\PUBS\ET\COLOUR\OUT\%2*etbg*_*.ps > f:\news\main\stamp\%2etban
dir \\PUB-ETPDF\PUBS\ET\BW\OUT\%2*etbg*_*.ps >> f:\news\main\stamp\%2etban
echo ------------------------------ >> f:\news\main\stamp\%2etban
dir j:\et\blr\pageout\%2*etbg*_*.pdf >> f:\news\main\stamp\%2etban
m:
cd\oliveet\che
dir \\PUB-ETPDF\PUBS\ET\CHENNAI\OUT\%2*etch*_*.ps > f:\news\main\stamp\%2etche
echo ------------------------------ >> f:\news\main\stamp\%2etche
dir j:\et\che\pageout\%2*etch*_*.pdf >> f:\news\main\stamp\%2etche
m:
cd\oliveet\hyd
dir \\PUB-ETPDF\PUBS\ET\HYDERABAD\OUT\%2*eth*_*.ps > f:\news\main\stamp\%2ethyd
echo ------------------------------ >> f:\news\main\stamp\%2ethyd
dir j:\et\hyd\pageout\%2*eth*_*.pdf >> f:\news\main\stamp\%2ethyd
m:
cd\oliveet\koc
dir \\PUB-ETPDF\PUBS\ET\COCHIN\OUT\%2*etc*_*.ps > f:\news\main\stamp\%2etkoc
echo ------------------------------ >> f:\news\main\stamp\%2etkoc
dir j:\et\koc\pageout\%2*etc*_*.pdf >> f:\news\main\stamp\%2etkoc
C:
CD\
MD MAIN
CD MAIN
MD prakash
f:
CD\news\main\stamp
move F:\NEWS\MAIN\STAMP\%2*.* C:\MAIN\PRAKASH
copy c:\main\PRAKASH\%2*.* f:\news\main\stamp
:end
@echo today date and issue date
-------------------------------------------------
This is single programme ...Sample programme for understanding syntax concept:
Deleting, Copy files to different directory, backup
Understand the concept of programme.
@echo on
@echo ** pl chk f: g: m: directory ***
f:
g:
m:
sleep 10
if "%1"== goto tmn
rem ********************************** tomorrow story backup raghu
echo y|copy g:\et\%1\snd\*.* d:\main\raghu
echo y|copy g:\et\%1\snd\*.* e:\enews\eco
echo y|copy g:\et\%1\snd\*.* d:\main\raghu
echo y|copy g:\et\%1\snd\*.* g:\eco\eco
rem ********************************** tomorrow story backup raghu
rem copy all ig pages to thanthi directory *****************
xcopy g:\et\%1\etpdf\*_etm_bb*.* g:\et\%1\thanthi
rem ********** copy all chennai pdf file to thanthi directory ********
xcopy32 j:\pdfview\*_etch*.* g:\et\%1\thanthi
rem *****************************end
echo y|move g:\eco\eto\*.* d:\main\eto
echo y|move g:\eco\eta\*.* d:\main\eta
echo y|del k:\pageout\mgl\view\%1*.*
echo y|del k:\pageout\mys\out\%1*.*
echo y|del k:\pageout\mys\view\%1*.*
echo y|del k:\pageout\view\*.pdf
echo y|del k:\graphic\*.*
rem one set ************************
rem below line will delete onecagain if you run this bat file onceagain
echo y|del f:\news\main\reg\back\*.*
echo y|del f:\times\btimes\btcity\backup\*.*
echo y|move f:\news\main\reg\pict\*.* f:\news\main\reg\back
echo y|del f:\news\main\reg\cbe\*.*
echo y|del f:\news\main\reg\goa\*.*
echo y|del f:\news\main\reg\vizag\*.*
rem one sent end *******************
echo y|del f:\news\main\rpt\system\*.*
echo y|del f:\news\main\rpt\prepress\*.*
echo y|del f:\news\zipin\*.*
echo y|del f:\news\zipout\*.*
echo y|del f:\news\zipout\*.*
echo y|del f:\news\pun\*.*
echo y|del f:\times\btimes\chandi\*.*
echo y|del q:\tc\cache\*.*
echo y|move f:\times\btimes\btcity\??bt1*.* f:\times\btimes\btcity\backup
echo y|move f:\times\btimes\btcity\??bt2*.* f:\times\btimes\btcity\backup
echo y|del f:\times\btimes\btcity\??bt1*.*
echo y|del f:\times\btimes\btcity\??bt2*.*
echo y|del d:\main\rpt\*.*
echo y|del d:\main\net\*.*
echo y|del c:\main\input\pen\*.*
echo y|del d:\main\input\mpl\*.*
echo y|del d:\main\inbox\*.*
echo y|del d:\main\input\data1\*.*
echo y|del g:\eco\all\*.*
echo y|del g:\eco\eco\*.*
echo y|del g:\eco\allg\*.*
echo y|del g:\eco\toiedit\*.*
echo y|del g:\eco\etedit\*.*
echo y|del g:\eco\daily\*.*
echo y|del j:\et\hyd\out\*.*
echo y|del j:\et\che\out\*.*
echo y|del j:\et\blr\*.ps
echo y|del j:\et\che\view\*.*
echo y|del j:\et\koc\view\*.*
echo y|del j:\et\ham\sou\*.*
echo y|del j:\et\sou\*.*
echo y|del j:\et\graphic\lores\*.*
echo y|del j:\et\link\*.*
move d:\main\toionlin\*.zip f:\news\main\toionlin /m
echo y|move d:\main\etonline\*.zip g:\eco\main\etonline
echo y|del d:\main\toionlin\*.zip
echo y|del d:\main\etonline\*.zip
rem ************* olive toi-nie *************
rem move m:\olivetoi\nie\*.* n:\amssbak\olivetoi\ban /m
echo y|del m:\olivetoi\nie\%1*.*
echo y|del m:\olivetoi\nie\ps\%1*.*
echo y|del m:\olivetoi\nie\zip\%1*.*
rem ************* olive toi-ban page *************
rem move m:\olivetoi\ban\*.* n:\amssbak\olivetoi\ban /m
e
echo y|del m:\olivetoi\ban\zip\%1*.*
rem ************* olive toi-ban page end
sleep 10
echo y|del m:\olivetoi\mgl\ps\%1*.*
rem move m:\olivetoi\mgl\zip\*.* n:\amssbak\olivetoi\mgl
echo y|del m:\olivetoi\mgl\zip\%1*.*
rem ************* olive toi-mgl page end
echo y|del m:\olivetoi\mys\ps\%1*.*
rem move m:\olivetoi\mys\zip\*.* n:\amssbak\olivetoi\mys
echo y|del m:\olivetoi\mys\zip\%1*.*
rem ************* olive toi-mys page end
rem ************* olive page - et - ban, che, koc, hyd *************
rem move m:\oliveet\ban\*.* n:\amssbak\oliveet\ban
echo y|del m:\oliveet\ban\%1*.*
echo y|del m:\oliveet\ban\ps\%1*.*
echo y|del m:\oliveet\ban\zip\%1*.*
rem move m:\oliveet\che\*.* n:\amssbak\oliveet\che
echo y|del m:\oliveet\che\%1*.*
echo y|del m:\oliveet\che\ps\%1*.*
echo y|del m:\oliveet\che\zip\%1*.*
rem move m:\oliveet\koc\*.* n:\amssbak\oliveet\koc
echo y|del m:\oliveet\koc\%1*.*
echo y|del m:\oliveet\koc\ps\%1*.*
echo y|del m:\oliveet\koc\zip\%1*.*
rem move m:\oliveet\hyd\*.* n:\amssbak\oliveet\hyd
echo y|del m:\oliveet\hyd\%1*.*
echo y|del m:\oliveet\hyd\ps\%1*.*
echo y|del m:\oliveet\hyd\zip\%1*.*
rem ************* olive page - et - all - end ******
pkzipn g:\eco\main\etonline\%1ethpgs g:\eco\daily\*etbh*.*
pkzipn g:\eco\main\etonline\%1etkpgs g:\eco\daily\*etbk*.*
echo y|del f:\news\main\toionlin\*.qxd
echo y|del f:\news\daily\*.*
echo y|del g:\eco\daily\*.*
rem *************** toi and et online zip end
echo y|del k:\temp\toisch\*.*
echo y|del k:\pageout\blr\out\*toisch*.*
xcopy32 j:\pics\graphic\temp\*.* g:\et\%1\thanthi /m
echo y|del f:\users\times\wire\business\*.*
echo y|del f:\users\times\wire\sports\*.*
echo y|del f:\users\times\wire\ap\*.*
echo y|del g:\et\wire\business\*.*
echo y|del g:\et\wire\sports\*.*
echo y|del g:\et\wire\reu\*.*
echo y|del g:\et\wire\ap\*.*
echo y|xcopy k:\pageout\vpl\out\*.* n:\lib\toipdf\%1 /m
echo y|xcopy k:\pageout\vpl\view\*.* n:\lib\toipdf\%1 /m
goto tmn
:end
@echo ** please type yesterday date, today date**
@echo 1 = yesterday date 2 = today date
@echo cleaning was done upto stopn1.bat %1 >> p:\bat\stopn2.txt
:tmn
@echo please type today date only
@echo stopn.bat %date%
Automatic zipping files and copied to different directory.
Do not copy and run the programme, just understand the concept of programme.
Dos command for ziping and unziping files
pkunzipn.exe and pkzip.exe -- download these two software from internet.
you have to down load both pkzip and pkunzip for windows 64 bit.
or 7-zip application. Link given here.
https://www.7-zip.org/
@echo onif "%1" == "" goto end
if "%2" == "" goto end
if "%3" == "" goto end
if exist f:\times\btimes\btcity\%3*_bgt_mpr_01*.qxd goto btpg2
if not exist f:\times\btimes\btcity\%3*_bgt_mpr_01*.qxd goto btend
:btpg2
if exist f:\times\btimes\btcity\%3*_bgt_mpr_02*.qxd goto bt1
if not exist f:\times\btimes\btcity\%3*_bgt_mpr_02*.qxd goto bt2msg
:bt2msg
p:\bat\notepad.exe bt2msg.txt
goto btend
:bt1
if exist f:\times\btimes\btcity\%3btimes*.zip goto btend
if not exist f:\times\btimes\btcity\%3btimes*.zip goto zip1
:zip1
xcopy f:\times\btimes\btcity\*.zip f:\times\btimes\btcity\backup /m
echo y| del f:\times\btimes\btcity\*.zip
pkzipn c:\main\%3btimes f:\times\btimes\btcity\*.*
sleep 10 bt ziping
rem echo y|xcopy c:\main\%3btimes*.zip f:\times\btimes\btzip /m
move c:\main\%3btimes*.zip f:\times\btimes\btcity
del c:\main\%1btimes*.zip
if exist f:\times\btimes\btcity\%3btimes*.zip goto btmove
if not exist f:\times\btimes\btcity\%3btimes*.zip goto btend
:btmove
move f:\times\btimes\btcity\*.eps f:\times\btimes\btcity\backup
move f:\times\btimes\btcity\*.qxd f:\times\btimes\btcity\backup
move f:\times\btimes\btcity\*.tif f:\times\btimes\btcity\backup
move f:\times\btimes\btcity\*.xtg f:\times\btimes\btcity\backup
del f:\times\btimes\btcity\*.eps
del f:\times\btimes\btcity\*.qxd
del f:\times\btimes\btcity\*.tif
del f:\times\btimes\btcity\*.xtg
if exist f:\times\btimes\btcity\%3btimes*zip goto msg1
if not exist f:\times\btimes\btcity\%3btimes*zip goto btend
:msg1
@echo "btfiles zipped and sent" > f:\news\btimes.snt
dir f:\times\btimes\btcity\*.zip >> f:\news\btimes.snt
pkunzipn f:\times\btimes\btcity\%3btimes*.zip -v *.qxd >> f:\news\btimes.snt
dir f:\times\btimes\btcity\backup\*.qxd >> f:\news\btimes.snt
:btend
rem bangalore times *********************************end
:end
@echo 1 = today date, 2= day 3=tomorrow date
:etp1
@echo Page one not present
:end
-----------------------------------------------
Do not copy and run the programme, just understand the concept of programme.
Sample programme for understanding syntax concept:
Listing different directory and storing it in one place. To check File received Time.
Note that how I used directory in this file.
if "%1"== "" goto end
if "%2"== "" goto end
m:
cd\olivetoi\ban
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*toibg*_mpr_*_m_*.ps > f:\news\main\stamp\%2toimet
dir \\PUB-OPI\PUBS\TOI\BW\OUT\%2*toibg*_mpr_*_m_*.ps >> f:\news\main\stamp\%2toimet
echo --------------------------------- >> f:\news\main\stamp\%2toimet
dir k:\pageout\blr\out\%2*toibg*_m_*.pdf >> f:\news\main\stamp\%2toimet
m:
cd\olivetoi\mys
dir \\PUB-OPI\PUBS\TOI\BW\OUT\%2*mys*_*.ps > f:\news\main\stamp\%2toimys
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*MYS*.ps >> f:\news\main\stamp\%2toimys
echo --------------------------------- >> f:\news\main\stamp\%2toimys
dir k:\pageout\mys\out\%2*mys*_*.pdf >> f:\news\main\stamp\%2toimys
m:
cd\olivetoi\hbl
dir \\PUB-OPI\PUBS\TOI\HUBLI\OUT\%2*toibg*_h_*.ps > f:\news\main\stamp\%2toihbl
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*toibg*_h_*.ps >> f:\news\main\stamp\%2toihbl
echo --------------------------------- >> f:\news\main\stamp\%2toihbl
dir k:\pageout\hbl\out\%2*toibg*_h_*.pdf >> f:\news\main\stamp\%2toihbl
m:
cd\olivetoi\mgl
dir \\PUB-OPI\PUBS\TOI\MANIPAL\OUT\%2*mang*_*.ps > f:\news\main\stamp\%2toimgl
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*mang*.ps >> f:\news\main\stamp\%2toimgl
echo -------------- ---------------- >> f:\news\main\stamp\%2toimgl
dir k:\pageout\mgl\out\%2*mang*_*.pdf >> f:\news\main\stamp\%2toimgl
m:
cd\olivetoi\nie
dir \\PUB-OPI\PUBS\TOI\BW\OUT\%2*nie*_*.ps > f:\news\main\stamp\%2toinie
dir \\PUB-OPI\PUBS\TOI\COLOUR\OUT\%2*nie*.ps >> f:\news\main\stamp\%2toinie
echo ------------------------------ >> f:\news\main\stamp\%2toinie
dir k:\pageout\nie\out\%2*nie*_*.pdf >> f:\news\main\stamp\%2toinie
m:
cd\oliveet\ban
dir \\PUB-ETPDF\PUBS\ET\COLOUR\OUT\%2*etbg*_*.ps > f:\news\main\stamp\%2etban
dir \\PUB-ETPDF\PUBS\ET\BW\OUT\%2*etbg*_*.ps >> f:\news\main\stamp\%2etban
echo ------------------------------ >> f:\news\main\stamp\%2etban
dir j:\et\blr\pageout\%2*etbg*_*.pdf >> f:\news\main\stamp\%2etban
m:
cd\oliveet\che
dir \\PUB-ETPDF\PUBS\ET\CHENNAI\OUT\%2*etch*_*.ps > f:\news\main\stamp\%2etche
echo ------------------------------ >> f:\news\main\stamp\%2etche
dir j:\et\che\pageout\%2*etch*_*.pdf >> f:\news\main\stamp\%2etche
m:
cd\oliveet\hyd
dir \\PUB-ETPDF\PUBS\ET\HYDERABAD\OUT\%2*eth*_*.ps > f:\news\main\stamp\%2ethyd
echo ------------------------------ >> f:\news\main\stamp\%2ethyd
dir j:\et\hyd\pageout\%2*eth*_*.pdf >> f:\news\main\stamp\%2ethyd
m:
cd\oliveet\koc
dir \\PUB-ETPDF\PUBS\ET\COCHIN\OUT\%2*etc*_*.ps > f:\news\main\stamp\%2etkoc
echo ------------------------------ >> f:\news\main\stamp\%2etkoc
dir j:\et\koc\pageout\%2*etc*_*.pdf >> f:\news\main\stamp\%2etkoc
C:
CD\
MD MAIN
CD MAIN
MD prakash
f:
CD\news\main\stamp
move F:\NEWS\MAIN\STAMP\%2*.* C:\MAIN\PRAKASH
copy c:\main\PRAKASH\%2*.* f:\news\main\stamp
:end
@echo today date and issue date
-------------------------------------------------
This is single programme ...Sample programme for understanding syntax concept:
Deleting, Copy files to different directory, backup
Understand the concept of programme.
@echo on
@echo ** pl chk f: g: m: directory ***
f:
g:
m:
sleep 10
if "%1"== goto tmn
rem ********************************** tomorrow story backup raghu
echo y|copy g:\et\%1\snd\*.* d:\main\raghu
echo y|copy g:\et\%1\snd\*.* e:\enews\eco
echo y|copy g:\et\%1\snd\*.* d:\main\raghu
echo y|copy g:\et\%1\snd\*.* g:\eco\eco
rem ********************************** tomorrow story backup raghu
rem copy all ig pages to thanthi directory *****************
xcopy g:\et\%1\etpdf\*_etm_bb*.* g:\et\%1\thanthi
rem ********** copy all chennai pdf file to thanthi directory ********
xcopy32 j:\pdfview\*_etch*.* g:\et\%1\thanthi
rem *****************************end
echo y|move g:\eco\eto\*.* d:\main\eto
echo y|move g:\eco\eta\*.* d:\main\eta
echo y|del k:\pageout\mgl\view\%1*.*
echo y|del k:\pageout\mys\out\%1*.*
echo y|del k:\pageout\mys\view\%1*.*
echo y|del k:\pageout\view\*.pdf
echo y|del k:\graphic\*.*
rem one set ************************
rem below line will delete onecagain if you run this bat file onceagain
echo y|del f:\news\main\reg\back\*.*
echo y|del f:\times\btimes\btcity\backup\*.*
echo y|move f:\news\main\reg\pict\*.* f:\news\main\reg\back
echo y|del f:\news\main\reg\cbe\*.*
echo y|del f:\news\main\reg\goa\*.*
echo y|del f:\news\main\reg\vizag\*.*
rem one sent end *******************
echo y|del f:\news\main\rpt\system\*.*
echo y|del f:\news\main\rpt\prepress\*.*
echo y|del f:\news\zipin\*.*
echo y|del f:\news\zipout\*.*
echo y|del f:\news\zipout\*.*
echo y|del f:\news\pun\*.*
echo y|del f:\times\btimes\chandi\*.*
echo y|del q:\tc\cache\*.*
echo y|move f:\times\btimes\btcity\??bt1*.* f:\times\btimes\btcity\backup
echo y|move f:\times\btimes\btcity\??bt2*.* f:\times\btimes\btcity\backup
echo y|del f:\times\btimes\btcity\??bt1*.*
echo y|del f:\times\btimes\btcity\??bt2*.*
echo y|del d:\main\rpt\*.*
echo y|del d:\main\net\*.*
echo y|del c:\main\input\pen\*.*
echo y|del d:\main\input\mpl\*.*
echo y|del d:\main\inbox\*.*
echo y|del d:\main\input\data1\*.*
echo y|del g:\eco\all\*.*
echo y|del g:\eco\eco\*.*
echo y|del g:\eco\allg\*.*
echo y|del g:\eco\toiedit\*.*
echo y|del g:\eco\etedit\*.*
echo y|del g:\eco\daily\*.*
echo y|del j:\et\hyd\out\*.*
echo y|del j:\et\che\out\*.*
echo y|del j:\et\blr\*.ps
echo y|del j:\et\che\view\*.*
echo y|del j:\et\koc\view\*.*
echo y|del j:\et\ham\sou\*.*
echo y|del j:\et\sou\*.*
echo y|del j:\et\graphic\lores\*.*
echo y|del j:\et\link\*.*
move d:\main\toionlin\*.zip f:\news\main\toionlin /m
echo y|move d:\main\etonline\*.zip g:\eco\main\etonline
echo y|del d:\main\toionlin\*.zip
echo y|del d:\main\etonline\*.zip
rem ************* olive toi-nie *************
rem move m:\olivetoi\nie\*.* n:\amssbak\olivetoi\ban /m
echo y|del m:\olivetoi\nie\%1*.*
echo y|del m:\olivetoi\nie\ps\%1*.*
echo y|del m:\olivetoi\nie\zip\%1*.*
rem ************* olive toi-ban page *************
rem move m:\olivetoi\ban\*.* n:\amssbak\olivetoi\ban /m
e
echo y|del m:\olivetoi\ban\zip\%1*.*
rem ************* olive toi-ban page end
sleep 10
echo y|del m:\olivetoi\mgl\ps\%1*.*
rem move m:\olivetoi\mgl\zip\*.* n:\amssbak\olivetoi\mgl
echo y|del m:\olivetoi\mgl\zip\%1*.*
rem ************* olive toi-mgl page end
echo y|del m:\olivetoi\mys\ps\%1*.*
rem move m:\olivetoi\mys\zip\*.* n:\amssbak\olivetoi\mys
echo y|del m:\olivetoi\mys\zip\%1*.*
rem ************* olive toi-mys page end
rem ************* olive page - et - ban, che, koc, hyd *************
rem move m:\oliveet\ban\*.* n:\amssbak\oliveet\ban
echo y|del m:\oliveet\ban\%1*.*
echo y|del m:\oliveet\ban\ps\%1*.*
echo y|del m:\oliveet\ban\zip\%1*.*
rem move m:\oliveet\che\*.* n:\amssbak\oliveet\che
echo y|del m:\oliveet\che\%1*.*
echo y|del m:\oliveet\che\ps\%1*.*
echo y|del m:\oliveet\che\zip\%1*.*
rem move m:\oliveet\koc\*.* n:\amssbak\oliveet\koc
echo y|del m:\oliveet\koc\%1*.*
echo y|del m:\oliveet\koc\ps\%1*.*
echo y|del m:\oliveet\koc\zip\%1*.*
rem move m:\oliveet\hyd\*.* n:\amssbak\oliveet\hyd
echo y|del m:\oliveet\hyd\%1*.*
echo y|del m:\oliveet\hyd\ps\%1*.*
echo y|del m:\oliveet\hyd\zip\%1*.*
rem ************* olive page - et - all - end ******
pkzipn g:\eco\main\etonline\%1ethpgs g:\eco\daily\*etbh*.*
pkzipn g:\eco\main\etonline\%1etkpgs g:\eco\daily\*etbk*.*
echo y|del f:\news\main\toionlin\*.qxd
echo y|del f:\news\daily\*.*
echo y|del g:\eco\daily\*.*
rem *************** toi and et online zip end
echo y|del k:\temp\toisch\*.*
echo y|del k:\pageout\blr\out\*toisch*.*
xcopy32 j:\pics\graphic\temp\*.* g:\et\%1\thanthi /m
echo y|del f:\users\times\wire\business\*.*
echo y|del f:\users\times\wire\sports\*.*
echo y|del f:\users\times\wire\ap\*.*
echo y|del g:\et\wire\business\*.*
echo y|del g:\et\wire\sports\*.*
echo y|del g:\et\wire\reu\*.*
echo y|del g:\et\wire\ap\*.*
echo y|xcopy k:\pageout\vpl\out\*.* n:\lib\toipdf\%1 /m
echo y|xcopy k:\pageout\vpl\view\*.* n:\lib\toipdf\%1 /m
goto tmn
:end
@echo ** please type yesterday date, today date**
@echo 1 = yesterday date 2 = today date
@echo cleaning was done upto stopn1.bat %1 >> p:\bat\stopn2.txt
:tmn
@echo please type today date only
@echo stopn.bat %date%
Sample programme - Understanding syntax concept used in many places.
rem @echo off
rem CAUTION : - DO NOT MAKE LOWER CASE OR UPPER CASE
rem change toi metro change t to tm, _c_ to _m_, toic24(schedule),
rem change toi metro k-toilas.cty to *.met
rem to chk missing files, f:\news\main\toi\pen, hbl, mpl, hyd
rem %1 tomorrow date
rem %2 and %3
rem page 2 delete was included at the end.
rem change year and month every month.
f:
cd\news
md main
cd main
md toi
md et
if "%1"=="" goto end
if "%2"=="" goto end
echo y|del f:\news\main\toi\*.*
echo y|del f:\news\main\toi\et\*.*
echo y|del f:\news\main\toi\temp\*.*
echo y|del f:\news\main\toi\misc\*.*
:start
rem sleep 600
@echo ********* toi pages checking *********
@echo ********************
@echo . > f:\news\main\toi\k-toipgs.snt
echo ************************************** >> f:\news\main\toi\k-toipgs.snt
echo * TOI PAGES SENT TO :- >> f:\news\main\toi\k-toipgs.snt
echo * PEENYA - HUBLI >> f:\news\main\toi\k-toipgs.snt
echo ************************ >> f:\news\main\toi\k-toipgs.snt
if exist k:\pageout\blr\out\%1*_toibg_mpr_01_b_c_*_r*.* goto page001
if not exist k:\pageout\blr\out\%1*_toibg_mpr_01_b_c_*_r*.* goto page01
:page01
echo test > f:\news\main\toi\%1t01.pdf
goto next2
:page001
del f:\news\main\toi\%1t01.pdf
echo %1t01.pdf >> f:\news\main\toi\k-toipgs.snt
rem new > sign above here *****
:next2
if exist k:\pageout\blr\out\%1*_toibg_mpr_02_b_c_*_r*.* goto page002
if not exist k:\pageout\blr\out\%1*_toibg_mpr_02_b_c_*_r*.* goto page02
:page02
echo test > f:\news\main\toi\%1t02.pdf
goto next3
:page002
del f:\news\main\toi\%1t02.pdf
echo %1t02.pdf >> f:\news\main\toi\k-toipgs.snt
:next3
if exist k:\pageout\blr\out\%1*_toibg_mpr_03_b_c_*_r*.* goto page003
if not exist k:\pageout\blr\out\%1*_toibg_mpr_03_b_c_*_r*.* goto page03
:page03
echo test > f:\news\main\toi\%1t03.pdf
goto next4
:page003
del f:\news\main\toi\%1t03.pdf
echo %1t03.pdf >> f:\news\main\toi\k-toipgs.snt
:next4
if exist k:\pageout\blr\out\%1*_toibg_mpr_04_b_c_*_r*.* goto page004
if not exist k:\pageout\blr\out\%1*_toibg_mpr_04_b_c_*_r*.* goto page04
:page04
echo test > f:\news\main\toi\%1t04.pdf
goto next5
:page004
del f:\news\main\toi\%1t04.pdf
echo %1t04.pdf >> f:\news\main\toi\k-toipgs.snt
:next5
if exist k:\pageout\blr\out\%1*_toibg_mpr_05_b_c_*_r*.* goto page005
if not exist k:\pageout\blr\out\%1*_toibg_mpr_05_b_c_*_r*.* goto page05
:page05
echo test > f:\news\main\toi\%1t05.pdf
goto next6
:page005
del f:\news\main\toi\%1t05.pdf
echo %1t05.pdf >> f:\news\main\toi\k-toipgs.snt
:next6
if exist k:\pageout\blr\out\%1*_toibg_mpr_06_b_c_*_r*.* goto page006
if not exist k:\pageout\blr\out\%1*_toibg_mpr_06_b_c_*_r*.* goto page06
:page06
echo test > f:\news\main\toi\%1t06.pdf
goto next7
:page006
del f:\news\main\toi\%1t06.pdf
echo %1t06.pdf >> f:\news\main\toi\k-toipgs.snt
:next7
if exist k:\pageout\blr\out\%1*_toibg_mpr_07_b_c_*_r*.* goto page007
if not exist k:\pageout\blr\out\%1*_toibg_mpr_07_b_c_*_r*.* goto page07
:page07
echo test > f:\news\main\toi\%1t07.pdf
goto next8
:page007
del f:\news\main\toi\%1t07.pdf
echo %1t07.pdf >> f:\news\main\toi\k-toipgs.snt
:next8
if exist k:\pageout\blr\out\%1*_toibg_mpr_08_b_c_*_r*.* goto page008
if not exist k:\pageout\blr\out\%1*_toibg_mpr_08_b_c_*_r*.* goto page08
:page08
echo test > f:\news\main\toi\%1t08.pdf
goto next9
:page008
del f:\news\main\toi\%1t08.pdf
echo %1t08.pdf >> f:\news\main\toi\k-toipgs.snt
:next9
if exist k:\pageout\blr\out\%1*_toibg_mpr_09_b_c_*_r*.* goto page009
if not exist k:\pageout\blr\out\%1*_toibg_mpr_09_b_c_*_r*.* goto page09
:page09
echo test > f:\news\main\toi\%1t09.pdf
goto next10
:page009
del f:\news\main\toi\%1t09.pdf
echo %1t09.pdf >> f:\news\main\toi\k-toipgs.snt
:next10
if exist k:\pageout\blr\out\%1*_toibg_mpr_10_b_c_*_r*.* goto page010
if not exist k:\pageout\blr\out\%1*_toibg_mpr_10_b_c_*_r*.* goto page10
:page10
echo test > f:\news\main\toi\%1t10.pdf
goto next11
:page010
del f:\news\main\toi\%1t10.pdf
echo %1t10.pdf >> f:\news\main\toi\k-toipgs.snt
:next11
if exist k:\pageout\blr\out\%1*_toibg_mpr_11_b_c_*_r*.* goto page011
if not exist k:\pageout\blr\out\%1*_toibg_mpr_11_b_c_*_r*.* goto page11
:page11
echo test > f:\news\main\toi\%1t11.pdf
goto next12
:page011
del f:\news\main\toi\%1t11.pdf
echo %1t11.pdf >> f:\news\main\toi\k-toipgs.snt
:next12
if exist k:\pageout\blr\out\%1*_toibg_mpr_12_b_c_*_r*.* goto page012
if not exist k:\pageout\blr\out\%1*_toibg_mpr_12_b_c_*_r*.* goto page12
:page12
echo test > f:\news\main\toi\%1t12.pdf
goto next13
:page012
del f:\news\main\toi\%1t12.pdf
echo %1t12.pdf >> f:\news\main\toi\k-toipgs.snt
:next13
if exist k:\pageout\blr\out\%1*_toibg_mpr_13_b_c_*_r*.* goto page013
if not exist k:\pageout\blr\out\%1*_toibg_mpr_13_b_c_*_r*.* goto page13
:page13
echo test > f:\news\main\toi\%1t13.pdf
goto next14
:page013
del f:\news\main\toi\%1t13.pdf
echo %1t13.pdf >> f:\news\main\toi\k-toipgs.snt
:next14
if exist k:\pageout\blr\out\%1*_toibg_mpr_14_b_c_*_r*.* goto page014
if not exist k:\pageout\blr\out\%1*_toibg_mpr_14_b_c_*_r*.* goto page14
:page14
echo test > f:\news\main\toi\%1t14.pdf
goto next15
:page014
del f:\news\main\toi\%1t14.pdf
echo %1t14.pdf >> f:\news\main\toi\k-toipgs.snt
:next15
if exist k:\pageout\blr\out\%1*_toibg_mpr_15_b_c_*_r*.* goto page015
if not exist k:\pageout\blr\out\%1*_toibg_mpr_15_b_c_*_r*.* goto page15
:page15
echo test > f:\news\main\toi\%1t15.pdf
goto next16
:page015
del f:\news\main\toi\%1t15.pdf
echo %1t15.pdf >> f:\news\main\toi\k-toipgs.snt
:next16
if exist k:\pageout\blr\out\%1*_toibg_mpr_16_b_c_*_r*.* goto page016
if not exist k:\pageout\blr\out\%1*_toibg_mpr_16_b_c_*_r*.* goto page16
:page16
echo test > f:\news\main\toi\%1t16.pdf
goto next17
:page016
del f:\news\main\toi\%1t16.pdf
echo %1t16.pdf >> f:\news\main\toi\k-toipgs.snt
:next17
if exist k:\pageout\blr\out\%1*_toibg_mpr_17_b_c_*_r*.* goto page017
if not exist k:\pageout\blr\out\%1*_toibg_mpr_17_b_c_*_r*.* goto page17
:page17
echo test > f:\news\main\toi\%1t17.pdf
goto next18
:page017
del f:\news\main\toi\%1t17.pdf
echo %1t17.pdf >> f:\news\main\toi\k-toipgs.snt
:next18
if exist k:\pageout\blr\out\%1*_toibg_mpr_18_b_c_*_r*.* goto page018
if not exist k:\pageout\blr\out\%1*_toibg_mpr_18_b_c_*_r*.* goto page18
:page18
echo test > f:\news\main\toi\%1t18.pdf
goto next19
:page018
del f:\news\main\toi\%1t18.pdf
echo %1t18.pdf >> f:\news\main\toi\k-toipgs.snt
:next19
if exist k:\pageout\blr\out\%1*_toibg_mpr_19_b_c_*_r*.* goto page019
if not exist k:\pageout\blr\out\%1*_toibg_mpr_19_b_c_*_r*.* goto page19
:page19
echo test > f:\news\main\toi\%1t19.pdf
goto next20
:page019
del f:\news\main\toi\%1t19.pdf
echo %1t19.pdf >> f:\news\main\toi\k-toipgs.snt
:next20
if exist k:\pageout\blr\out\%1*_toibg_mpr_20_b_c_*_r*.* goto page020
if not exist k:\pageout\blr\out\%1*_toibg_mpr_20_b_c_*_r*.* goto page20
:page20
echo test > f:\news\main\toi\%1t20.pdf
goto next21
:page020
del f:\news\main\toi\%1t20.pdf
echo %1t20.pdf >> f:\news\main\toi\k-toipgs.snt
:next21
if exist k:\pageout\blr\out\%1*_toibg_mpr_21_b_c_*_r*.* goto page021
if not exist k:\pageout\blr\out\%1*_toibg_mpr_21_b_c_*_r*.* goto page21
:page21
echo test > f:\news\main\toi\%1t21.pdf
goto next22
:page021
del f:\news\main\toi\%1t21.pdf
echo %1t21.pdf >> f:\news\main\toi\k-toipgs.snt
:next22
if exist k:\pageout\blr\out\%1*_toibg_mpr_22_b_c_*_r*.* goto page022
if not exist k:\pageout\blr\out\%1*_toibg_mpr_22_b_c_*_r*.* goto page22
:page22
echo test > f:\news\main\toi\%1t22.pdf
goto next23
:page022
del f:\news\main\toi\%1t22.pdf
echo %1t22.pdf >> f:\news\main\toi\k-toipgs.snt
:next23
if exist k:\pageout\blr\out\%1*_toibg_mpr_23_b_c_*_r*.* goto page023
if not exist k:\pageout\blr\out\%1*_toibg_mpr_23_b_c_*_r*.* goto page23
:page23
echo test > f:\news\main\toi\%1t23.pdf
goto next24
:page023
del f:\news\main\toi\%1t23.pdf
echo %1t23.pdf >> f:\news\main\toi\k-toipgs.snt
:next24
if exist k:\pageout\blr\out\%1*_toibg_mpr_24_b_c_*_r*.* goto page024
if not exist k:\pageout\blr\out\%1*_toibg_mpr_24_b_c_*_r*.* goto page24
:page24
echo test > f:\news\main\toi\%1t24.pdf
goto next25
:page024
del f:\news\main\toi\%1t24.pdf
echo %1t24.pdf >> f:\news\main\toi\k-toipgs.snt
:next25
rem ************ hubli pages checking start
if exist k:\pageout\hbl\out\%1*_toibg_mpr_01_b_h_*_r*.* goto hbl1
if not exist k:\pageout\hbl\out\%1*_toibg_mpr_01_b_h_*_r*.* goto hbl1a
:hbl1a
echo test > f:\news\main\toi\%1th01.pdf
goto next-h1
:hbl1
del f:\news\main\toi\%1th01.pdf
echo %1th01.pdf >> f:\news\main\toi\k-toipgs.snt
:next-h1
if exist k:\pageout\hbl\out\%1*_toibg_mpr_03_b_h_*_r*.* goto hbl2
if not exist k:\pageout\hbl\out\%1*_toibg_mpr_03_b_h_*_r*.* goto hbl2a
:hbl2a
echo test > f:\news\main\toi\%1th03.pdf
goto next-h2
:hbl2
del f:\news\main\toi\%1th03.pdf
echo %1th03.pdf >> f:\news\main\toi\k-toipgs.snt
:next-h2
if exist k:\pageout\hbl\out\%1*_toibg_mpr_04_b_h_*_r*.* goto hbl4
if not exist k:\pageout\hbl\out\%1*_toibg_mpr_04_b_h_*_r*.* goto hbl4a
:hbl4a
echo test > f:\news\main\toi\%1th04.pdf
goto next-h3
:hbl4
del f:\news\main\toi\%1th04.pdf
echo %1th04.pdf >> f:\news\main\toi\k-toipgs.snt
:next-h3
del f:\news\main\toi\temp\%1toic*.%1
echo dated - %1 = total toi pages=%2 > f:\news\main\toi\temp\%1toic%2.%1
if exist f:\news\main\toi\temp\%1toic16.%1 goto toipg1
if not exist f:\news\main\toi\temp\%1toic16.%1 goto toipg2
:toipg1
del f:\news\main\toi\%1t17*.*
del f:\news\main\toi\%1t18*.*
del f:\news\main\toi\%1t19*.*
del f:\news\main\toi\%1t20*.*
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg2
if exist f:\news\main\toi\temp\%1toic18.%1 goto toipg3
if not exist f:\news\main\toi\temp\%1toic18.%1 goto toipg4
:toipg3
del f:\news\main\toi\%1t19*.*
del f:\news\main\toi\%1t20*.*
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg4
if exist f:\news\main\toi\temp\%1toic20.%1 goto toipg5
if not exist f:\news\main\toi\temp\%1toic20.%1 goto toipg6
:toipg5
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg6
if exist f:\news\main\toi\temp\%1toic22.%1 goto toipg7
if not exist f:\news\main\toi\temp\%1toic22.%1 goto toipg8
:toipg7
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg8
if exist f:\news\main\toi\temp\%1toic16.%1 goto toipg9
if not exist f:\news\main\toi\temp\%1toic16.%1 goto toipg10
:toipg9
del f:\news\main\toi\%1t17*.*
del f:\news\main\toi\%1t18*.*
del f:\news\main\toi\%1t19*.*
del f:\news\main\toi\%1t20*.*
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg10
del c:\main\input\??th02*.*
del c:\main\input\?th02*.*
rem ******* *************************** times pages over
@echo. > f:\news\main\toi\k-toipgs.dir
@echo ******************************************** >> f:\news\main\toi\k-toipgs.dir
@echo * BANGALORE - TOI PAGES - DIR >> f:\news\main\toi\k-toipgs.dir
@echo ***************************************** >> f:\news\main\toi\k-toipgs.dir
dir k:\pageout\blr\out\*.* >> f:\news\main\toi\k-toipgs.dir
@echo *************** >> f:\news\main\toi\k-toipgs.dir
@echo * HUBLI - TOI PAGES - DIR >> f:\news\main\toi\k-toipgs.dir
@echo ******************************************** >> f:\news\main\toi\k-toipgs.dir
dir k:\pageout\hbl\out\*.* >> f:\news\main\toi\k-toipgs.dir
rem ************** times of india pending pages ***************
@echo. > f:\news\main\toi\k-toipgs.pen
@echo ********************** >> f:\news\main\toi\k-toipgs.pen
@echo * P E N D I N G - TOI PAGES >> f:\news\main\toi\k-toipgs.pen
@echo * Peenya Hubli >> f:\news\main\toi\k-toipgs.pen
@echo ***************************************** >> f:\news\main\toi\k-toipgs.pen
dir f:\news\main\toi\%1t*.* >> f:\news\main\toi\k-toipgs.pen
@echo. > f:\news\main\toi\k-hblpgs.pen
@echo *********************** >> f:\news\main\toi\k-hblpgs.pen
@echo * PENDING - TOI PAGES >> f:\news\main\toi\k-hblpgs.pen
@echo * H U B L I >> f:\news\main\toi\k-hblpgs.pen
@echo ********************* >> f:\news\main\toi\k-hblpgs.pen
dir f:\news\main\toi\%1th*.* >> f:\news\main\toi\k-hblpgs.pen
rem **** times of india city and metro dir ********
@echo. > f:\news\main\toi\misc\k-toicty.dir
@echo ********************* >> f:\news\main\toi\misc\k-toicty.dir
@echo * CITY - TOI PAGES - DIR >> f:\news\main\toi\misc\k-toicty.dir
@echo * PEENYA >> f:\news\main\toi\misc\k-toicty.dir
@echo ***************************************** >> f:\news\main\toi\misc\k-toicty.dir
dir k:\pageout\blr\out\%1*_toibg_mpr_*_b_c_*_r*.* >> f:\news\main\toi\misc\k-toicty.dir
rem ************** times of india last page dir ***************
@echo. > f:\news\main\toi\misc\k-toilas.cty
@echo ******************* >> f:\news\main\toi\misc\k-toilas.cty
@echo * CITY - TOI - LAST PAGE >> f:\news\main\toi\misc\k-toilas.cty
@echo * PEENYA >> f:\news\main\toi\misc\k-toilas.cty
@echo ******************** >> f:\news\main\toi\misc\k-toilas.cty
dir k:\pageout\blr\out\%1*_toibg_mpr_*_b_c_*_r*.* /od >> f:\news\main\toi\misc\k-toilas.cty
@echo ********************** toi pages sent ******** >> f:\news\main\toi\all-menu
copy f:\news\main\toi\all-menu+ = f:\news\main\toi\k-toipgs.snt /y
@echo . >> f:\news\main\toi\all-menu
@echo ****************toi end********* >> f:\news\main\toi\all-menu
@echo *************toi end************** >> f:\news\main\toi\all-menu
rem * toi pages
call p:\bat\rev.bat %1
notepad.exe f:\news\main\toi\k-toipgs.pen
notepad.exe f:\news\main\toi\k-toipgs.snt
notepad.exe f:\news\main\toi\misc\k-toilas.cty
notepad.exe f:\news\main\toi\k-toipgs.dir
f:
cd\news\main\toi
rem close "k-toipgs.pen - Notepad"
rem close "k-toipgs.snt - Notepad"
f:
cd\news\main\toi\misc
rem close.exe "k-toilas.cty - Notepad"
rem close.exe "k-toipgs - Notepad"
rem call p:\bat\rev.bat %1
rem ncftpput -u opi@10.130.7.37 -p opi 10.130.2.92 \wwwroot\toiet-chk f:\news\main\toi\all-menu*.*
REM goto start
goto tmn
:end
cls
rem follow this order ** t/m date, toi , bgl , che, hyd, koc
@echo. 1= tomorrow date 2= toi city edition total page number
:tmn
rem @echo off
rem CAUTION : - DO NOT MAKE LOWER CASE OR UPPER CASE
rem change toi metro change t to tm, _c_ to _m_, toic24(schedule),
rem change toi metro k-toilas.cty to *.met
rem to chk missing files, f:\news\main\toi\pen, hbl, mpl, hyd
rem %1 tomorrow date
rem %2 and %3
rem page 2 delete was included at the end.
rem change year and month every month.
f:
cd\news
md main
cd main
md toi
md et
if "%1"=="" goto end
if "%2"=="" goto end
echo y|del f:\news\main\toi\*.*
echo y|del f:\news\main\toi\et\*.*
echo y|del f:\news\main\toi\temp\*.*
echo y|del f:\news\main\toi\misc\*.*
:start
rem sleep 600
@echo ********* toi pages checking *********
@echo ********************
@echo . > f:\news\main\toi\k-toipgs.snt
echo ************************************** >> f:\news\main\toi\k-toipgs.snt
echo * TOI PAGES SENT TO :- >> f:\news\main\toi\k-toipgs.snt
echo * PEENYA - HUBLI >> f:\news\main\toi\k-toipgs.snt
echo ************************ >> f:\news\main\toi\k-toipgs.snt
if exist k:\pageout\blr\out\%1*_toibg_mpr_01_b_c_*_r*.* goto page001
if not exist k:\pageout\blr\out\%1*_toibg_mpr_01_b_c_*_r*.* goto page01
:page01
echo test > f:\news\main\toi\%1t01.pdf
goto next2
:page001
del f:\news\main\toi\%1t01.pdf
echo %1t01.pdf >> f:\news\main\toi\k-toipgs.snt
rem new > sign above here *****
:next2
if exist k:\pageout\blr\out\%1*_toibg_mpr_02_b_c_*_r*.* goto page002
if not exist k:\pageout\blr\out\%1*_toibg_mpr_02_b_c_*_r*.* goto page02
:page02
echo test > f:\news\main\toi\%1t02.pdf
goto next3
:page002
del f:\news\main\toi\%1t02.pdf
echo %1t02.pdf >> f:\news\main\toi\k-toipgs.snt
:next3
if exist k:\pageout\blr\out\%1*_toibg_mpr_03_b_c_*_r*.* goto page003
if not exist k:\pageout\blr\out\%1*_toibg_mpr_03_b_c_*_r*.* goto page03
:page03
echo test > f:\news\main\toi\%1t03.pdf
goto next4
:page003
del f:\news\main\toi\%1t03.pdf
echo %1t03.pdf >> f:\news\main\toi\k-toipgs.snt
:next4
if exist k:\pageout\blr\out\%1*_toibg_mpr_04_b_c_*_r*.* goto page004
if not exist k:\pageout\blr\out\%1*_toibg_mpr_04_b_c_*_r*.* goto page04
:page04
echo test > f:\news\main\toi\%1t04.pdf
goto next5
:page004
del f:\news\main\toi\%1t04.pdf
echo %1t04.pdf >> f:\news\main\toi\k-toipgs.snt
:next5
if exist k:\pageout\blr\out\%1*_toibg_mpr_05_b_c_*_r*.* goto page005
if not exist k:\pageout\blr\out\%1*_toibg_mpr_05_b_c_*_r*.* goto page05
:page05
echo test > f:\news\main\toi\%1t05.pdf
goto next6
:page005
del f:\news\main\toi\%1t05.pdf
echo %1t05.pdf >> f:\news\main\toi\k-toipgs.snt
:next6
if exist k:\pageout\blr\out\%1*_toibg_mpr_06_b_c_*_r*.* goto page006
if not exist k:\pageout\blr\out\%1*_toibg_mpr_06_b_c_*_r*.* goto page06
:page06
echo test > f:\news\main\toi\%1t06.pdf
goto next7
:page006
del f:\news\main\toi\%1t06.pdf
echo %1t06.pdf >> f:\news\main\toi\k-toipgs.snt
:next7
if exist k:\pageout\blr\out\%1*_toibg_mpr_07_b_c_*_r*.* goto page007
if not exist k:\pageout\blr\out\%1*_toibg_mpr_07_b_c_*_r*.* goto page07
:page07
echo test > f:\news\main\toi\%1t07.pdf
goto next8
:page007
del f:\news\main\toi\%1t07.pdf
echo %1t07.pdf >> f:\news\main\toi\k-toipgs.snt
:next8
if exist k:\pageout\blr\out\%1*_toibg_mpr_08_b_c_*_r*.* goto page008
if not exist k:\pageout\blr\out\%1*_toibg_mpr_08_b_c_*_r*.* goto page08
:page08
echo test > f:\news\main\toi\%1t08.pdf
goto next9
:page008
del f:\news\main\toi\%1t08.pdf
echo %1t08.pdf >> f:\news\main\toi\k-toipgs.snt
:next9
if exist k:\pageout\blr\out\%1*_toibg_mpr_09_b_c_*_r*.* goto page009
if not exist k:\pageout\blr\out\%1*_toibg_mpr_09_b_c_*_r*.* goto page09
:page09
echo test > f:\news\main\toi\%1t09.pdf
goto next10
:page009
del f:\news\main\toi\%1t09.pdf
echo %1t09.pdf >> f:\news\main\toi\k-toipgs.snt
:next10
if exist k:\pageout\blr\out\%1*_toibg_mpr_10_b_c_*_r*.* goto page010
if not exist k:\pageout\blr\out\%1*_toibg_mpr_10_b_c_*_r*.* goto page10
:page10
echo test > f:\news\main\toi\%1t10.pdf
goto next11
:page010
del f:\news\main\toi\%1t10.pdf
echo %1t10.pdf >> f:\news\main\toi\k-toipgs.snt
:next11
if exist k:\pageout\blr\out\%1*_toibg_mpr_11_b_c_*_r*.* goto page011
if not exist k:\pageout\blr\out\%1*_toibg_mpr_11_b_c_*_r*.* goto page11
:page11
echo test > f:\news\main\toi\%1t11.pdf
goto next12
:page011
del f:\news\main\toi\%1t11.pdf
echo %1t11.pdf >> f:\news\main\toi\k-toipgs.snt
:next12
if exist k:\pageout\blr\out\%1*_toibg_mpr_12_b_c_*_r*.* goto page012
if not exist k:\pageout\blr\out\%1*_toibg_mpr_12_b_c_*_r*.* goto page12
:page12
echo test > f:\news\main\toi\%1t12.pdf
goto next13
:page012
del f:\news\main\toi\%1t12.pdf
echo %1t12.pdf >> f:\news\main\toi\k-toipgs.snt
:next13
if exist k:\pageout\blr\out\%1*_toibg_mpr_13_b_c_*_r*.* goto page013
if not exist k:\pageout\blr\out\%1*_toibg_mpr_13_b_c_*_r*.* goto page13
:page13
echo test > f:\news\main\toi\%1t13.pdf
goto next14
:page013
del f:\news\main\toi\%1t13.pdf
echo %1t13.pdf >> f:\news\main\toi\k-toipgs.snt
:next14
if exist k:\pageout\blr\out\%1*_toibg_mpr_14_b_c_*_r*.* goto page014
if not exist k:\pageout\blr\out\%1*_toibg_mpr_14_b_c_*_r*.* goto page14
:page14
echo test > f:\news\main\toi\%1t14.pdf
goto next15
:page014
del f:\news\main\toi\%1t14.pdf
echo %1t14.pdf >> f:\news\main\toi\k-toipgs.snt
:next15
if exist k:\pageout\blr\out\%1*_toibg_mpr_15_b_c_*_r*.* goto page015
if not exist k:\pageout\blr\out\%1*_toibg_mpr_15_b_c_*_r*.* goto page15
:page15
echo test > f:\news\main\toi\%1t15.pdf
goto next16
:page015
del f:\news\main\toi\%1t15.pdf
echo %1t15.pdf >> f:\news\main\toi\k-toipgs.snt
:next16
if exist k:\pageout\blr\out\%1*_toibg_mpr_16_b_c_*_r*.* goto page016
if not exist k:\pageout\blr\out\%1*_toibg_mpr_16_b_c_*_r*.* goto page16
:page16
echo test > f:\news\main\toi\%1t16.pdf
goto next17
:page016
del f:\news\main\toi\%1t16.pdf
echo %1t16.pdf >> f:\news\main\toi\k-toipgs.snt
:next17
if exist k:\pageout\blr\out\%1*_toibg_mpr_17_b_c_*_r*.* goto page017
if not exist k:\pageout\blr\out\%1*_toibg_mpr_17_b_c_*_r*.* goto page17
:page17
echo test > f:\news\main\toi\%1t17.pdf
goto next18
:page017
del f:\news\main\toi\%1t17.pdf
echo %1t17.pdf >> f:\news\main\toi\k-toipgs.snt
:next18
if exist k:\pageout\blr\out\%1*_toibg_mpr_18_b_c_*_r*.* goto page018
if not exist k:\pageout\blr\out\%1*_toibg_mpr_18_b_c_*_r*.* goto page18
:page18
echo test > f:\news\main\toi\%1t18.pdf
goto next19
:page018
del f:\news\main\toi\%1t18.pdf
echo %1t18.pdf >> f:\news\main\toi\k-toipgs.snt
:next19
if exist k:\pageout\blr\out\%1*_toibg_mpr_19_b_c_*_r*.* goto page019
if not exist k:\pageout\blr\out\%1*_toibg_mpr_19_b_c_*_r*.* goto page19
:page19
echo test > f:\news\main\toi\%1t19.pdf
goto next20
:page019
del f:\news\main\toi\%1t19.pdf
echo %1t19.pdf >> f:\news\main\toi\k-toipgs.snt
:next20
if exist k:\pageout\blr\out\%1*_toibg_mpr_20_b_c_*_r*.* goto page020
if not exist k:\pageout\blr\out\%1*_toibg_mpr_20_b_c_*_r*.* goto page20
:page20
echo test > f:\news\main\toi\%1t20.pdf
goto next21
:page020
del f:\news\main\toi\%1t20.pdf
echo %1t20.pdf >> f:\news\main\toi\k-toipgs.snt
:next21
if exist k:\pageout\blr\out\%1*_toibg_mpr_21_b_c_*_r*.* goto page021
if not exist k:\pageout\blr\out\%1*_toibg_mpr_21_b_c_*_r*.* goto page21
:page21
echo test > f:\news\main\toi\%1t21.pdf
goto next22
:page021
del f:\news\main\toi\%1t21.pdf
echo %1t21.pdf >> f:\news\main\toi\k-toipgs.snt
:next22
if exist k:\pageout\blr\out\%1*_toibg_mpr_22_b_c_*_r*.* goto page022
if not exist k:\pageout\blr\out\%1*_toibg_mpr_22_b_c_*_r*.* goto page22
:page22
echo test > f:\news\main\toi\%1t22.pdf
goto next23
:page022
del f:\news\main\toi\%1t22.pdf
echo %1t22.pdf >> f:\news\main\toi\k-toipgs.snt
:next23
if exist k:\pageout\blr\out\%1*_toibg_mpr_23_b_c_*_r*.* goto page023
if not exist k:\pageout\blr\out\%1*_toibg_mpr_23_b_c_*_r*.* goto page23
:page23
echo test > f:\news\main\toi\%1t23.pdf
goto next24
:page023
del f:\news\main\toi\%1t23.pdf
echo %1t23.pdf >> f:\news\main\toi\k-toipgs.snt
:next24
if exist k:\pageout\blr\out\%1*_toibg_mpr_24_b_c_*_r*.* goto page024
if not exist k:\pageout\blr\out\%1*_toibg_mpr_24_b_c_*_r*.* goto page24
:page24
echo test > f:\news\main\toi\%1t24.pdf
goto next25
:page024
del f:\news\main\toi\%1t24.pdf
echo %1t24.pdf >> f:\news\main\toi\k-toipgs.snt
:next25
rem ************ hubli pages checking start
if exist k:\pageout\hbl\out\%1*_toibg_mpr_01_b_h_*_r*.* goto hbl1
if not exist k:\pageout\hbl\out\%1*_toibg_mpr_01_b_h_*_r*.* goto hbl1a
:hbl1a
echo test > f:\news\main\toi\%1th01.pdf
goto next-h1
:hbl1
del f:\news\main\toi\%1th01.pdf
echo %1th01.pdf >> f:\news\main\toi\k-toipgs.snt
:next-h1
if exist k:\pageout\hbl\out\%1*_toibg_mpr_03_b_h_*_r*.* goto hbl2
if not exist k:\pageout\hbl\out\%1*_toibg_mpr_03_b_h_*_r*.* goto hbl2a
:hbl2a
echo test > f:\news\main\toi\%1th03.pdf
goto next-h2
:hbl2
del f:\news\main\toi\%1th03.pdf
echo %1th03.pdf >> f:\news\main\toi\k-toipgs.snt
:next-h2
if exist k:\pageout\hbl\out\%1*_toibg_mpr_04_b_h_*_r*.* goto hbl4
if not exist k:\pageout\hbl\out\%1*_toibg_mpr_04_b_h_*_r*.* goto hbl4a
:hbl4a
echo test > f:\news\main\toi\%1th04.pdf
goto next-h3
:hbl4
del f:\news\main\toi\%1th04.pdf
echo %1th04.pdf >> f:\news\main\toi\k-toipgs.snt
:next-h3
del f:\news\main\toi\temp\%1toic*.%1
echo dated - %1 = total toi pages=%2 > f:\news\main\toi\temp\%1toic%2.%1
if exist f:\news\main\toi\temp\%1toic16.%1 goto toipg1
if not exist f:\news\main\toi\temp\%1toic16.%1 goto toipg2
:toipg1
del f:\news\main\toi\%1t17*.*
del f:\news\main\toi\%1t18*.*
del f:\news\main\toi\%1t19*.*
del f:\news\main\toi\%1t20*.*
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg2
if exist f:\news\main\toi\temp\%1toic18.%1 goto toipg3
if not exist f:\news\main\toi\temp\%1toic18.%1 goto toipg4
:toipg3
del f:\news\main\toi\%1t19*.*
del f:\news\main\toi\%1t20*.*
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg4
if exist f:\news\main\toi\temp\%1toic20.%1 goto toipg5
if not exist f:\news\main\toi\temp\%1toic20.%1 goto toipg6
:toipg5
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg6
if exist f:\news\main\toi\temp\%1toic22.%1 goto toipg7
if not exist f:\news\main\toi\temp\%1toic22.%1 goto toipg8
:toipg7
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg8
if exist f:\news\main\toi\temp\%1toic16.%1 goto toipg9
if not exist f:\news\main\toi\temp\%1toic16.%1 goto toipg10
:toipg9
del f:\news\main\toi\%1t17*.*
del f:\news\main\toi\%1t18*.*
del f:\news\main\toi\%1t19*.*
del f:\news\main\toi\%1t20*.*
del f:\news\main\toi\%1t21*.*
del f:\news\main\toi\%1t22*.*
del f:\news\main\toi\%1t23*.*
del f:\news\main\toi\%1t24*.*
:toipg10
del c:\main\input\??th02*.*
del c:\main\input\?th02*.*
rem ******* *************************** times pages over
@echo. > f:\news\main\toi\k-toipgs.dir
@echo ******************************************** >> f:\news\main\toi\k-toipgs.dir
@echo * BANGALORE - TOI PAGES - DIR >> f:\news\main\toi\k-toipgs.dir
@echo ***************************************** >> f:\news\main\toi\k-toipgs.dir
dir k:\pageout\blr\out\*.* >> f:\news\main\toi\k-toipgs.dir
@echo *************** >> f:\news\main\toi\k-toipgs.dir
@echo * HUBLI - TOI PAGES - DIR >> f:\news\main\toi\k-toipgs.dir
@echo ******************************************** >> f:\news\main\toi\k-toipgs.dir
dir k:\pageout\hbl\out\*.* >> f:\news\main\toi\k-toipgs.dir
rem ************** times of india pending pages ***************
@echo. > f:\news\main\toi\k-toipgs.pen
@echo ********************** >> f:\news\main\toi\k-toipgs.pen
@echo * P E N D I N G - TOI PAGES >> f:\news\main\toi\k-toipgs.pen
@echo * Peenya Hubli >> f:\news\main\toi\k-toipgs.pen
@echo ***************************************** >> f:\news\main\toi\k-toipgs.pen
dir f:\news\main\toi\%1t*.* >> f:\news\main\toi\k-toipgs.pen
@echo. > f:\news\main\toi\k-hblpgs.pen
@echo *********************** >> f:\news\main\toi\k-hblpgs.pen
@echo * PENDING - TOI PAGES >> f:\news\main\toi\k-hblpgs.pen
@echo * H U B L I >> f:\news\main\toi\k-hblpgs.pen
@echo ********************* >> f:\news\main\toi\k-hblpgs.pen
dir f:\news\main\toi\%1th*.* >> f:\news\main\toi\k-hblpgs.pen
rem **** times of india city and metro dir ********
@echo. > f:\news\main\toi\misc\k-toicty.dir
@echo ********************* >> f:\news\main\toi\misc\k-toicty.dir
@echo * CITY - TOI PAGES - DIR >> f:\news\main\toi\misc\k-toicty.dir
@echo * PEENYA >> f:\news\main\toi\misc\k-toicty.dir
@echo ***************************************** >> f:\news\main\toi\misc\k-toicty.dir
dir k:\pageout\blr\out\%1*_toibg_mpr_*_b_c_*_r*.* >> f:\news\main\toi\misc\k-toicty.dir
rem ************** times of india last page dir ***************
@echo. > f:\news\main\toi\misc\k-toilas.cty
@echo ******************* >> f:\news\main\toi\misc\k-toilas.cty
@echo * CITY - TOI - LAST PAGE >> f:\news\main\toi\misc\k-toilas.cty
@echo * PEENYA >> f:\news\main\toi\misc\k-toilas.cty
@echo ******************** >> f:\news\main\toi\misc\k-toilas.cty
dir k:\pageout\blr\out\%1*_toibg_mpr_*_b_c_*_r*.* /od >> f:\news\main\toi\misc\k-toilas.cty
@echo ********************** toi pages sent ******** >> f:\news\main\toi\all-menu
copy f:\news\main\toi\all-menu+ = f:\news\main\toi\k-toipgs.snt /y
@echo . >> f:\news\main\toi\all-menu
@echo ****************toi end********* >> f:\news\main\toi\all-menu
@echo *************toi end************** >> f:\news\main\toi\all-menu
rem * toi pages
call p:\bat\rev.bat %1
notepad.exe f:\news\main\toi\k-toipgs.pen
notepad.exe f:\news\main\toi\k-toipgs.snt
notepad.exe f:\news\main\toi\misc\k-toilas.cty
notepad.exe f:\news\main\toi\k-toipgs.dir
f:
cd\news\main\toi
rem close "k-toipgs.pen - Notepad"
rem close "k-toipgs.snt - Notepad"
f:
cd\news\main\toi\misc
rem close.exe "k-toilas.cty - Notepad"
rem close.exe "k-toipgs - Notepad"
rem call p:\bat\rev.bat %1
rem ncftpput -u opi@10.130.7.37 -p opi 10.130.2.92 \wwwroot\toiet-chk f:\news\main\toi\all-menu*.*
REM goto start
goto tmn
:end
cls
rem follow this order ** t/m date, toi , bgl , che, hyd, koc
@echo. 1= tomorrow date 2= toi city edition total page number
:tmn
----------------------------------------------------
END
START WITH
SIMPLE BAT FILE ONE LINE COMMAND LIKE
COPY, CHANGING DIRECTORY, CREATING DIRECTORY.
TAKE EXTRA CARE WHEN YOU ARE DELETING FILES - .THANK YOU, GOOD LUCK.
My email address atmeganathan@gmail.com

No comments:
Post a Comment