Циклы и ветвление в скpиптах
Mihail Alekseyev написал(а) к All в Oct 15 19:21:57 по местному времени:
Нello All
Вспоминаем золотые дни ФИПСА :)
======================
(c) Yuri Burawtsow
----------- start.fps ------------------
WINEXEC Prepare.bat
call TosserScript.Fps
----------------------------------------
----------- Prepare.bat ----------------
Echo ; Automatically generated inbound processing script > TosserScript.Fps
Set Inbound=E:\Fido\Inbound
Set Sw1=0
Set Sw2=0
call ..\T-Mail\MakeDateFolder.bat
md %Inbound%\Pkt\%DateFolder%
Move %Inbound%\Pkt\*.pkt %Inbound%\pkt\%DateFolder%
if Exist %Inbound%\NodelistCompile.flag Set Sw2=1
if Exist %Inbound%\NodelistCompile.flag del %Inbound%\NodelistCompile.flag
if Exist %Inbound%\nodelist.* Set Sw2=1
if Exist %Inbound%\nodediff.* Set Sw2=1
if Exist %Inbound%\pnt. Set Sw2=1
if Exist %Inbound%\rpnt. Set Sw2=1
if Exist %Inbound%\*.pkt GoTo Loop1
if Exist %Inbound%\*.mo? GoTo Loop1
if Exist %Inbound%\*.tu? GoTo Loop1
if Exist %Inbound%\*.we? GoTo Loop1
if Exist %Inbound%\*.th? GoTo Loop1
if Exist %Inbound%\*.fr? GoTo Loop1
if Exist %Inbound%\*.sa? GoTo Loop1
if Exist %Inbound%\*.su? GoTo Loop1
GoTo Loop2
:Loop1
Set Sw1=1
Echo Call Tossing.fps >> TosserScript.Fps
:Loop2
if Exist %Inbound%\*.tic GoTo Loop3
if %Sw2%==1 GoTo Loop3
GoTo Loop4
:Loop3
Echo Show Mailer >> TosserScript.Fps
Echo Checkinbound >> TosserScript.Fps
Echo System Move /y %Inbound%\*.tic %Inbound%\Tic >> TosserScript.Fps
Echo Нide Mailer >> TosserScript.Fps
:Loop4
if %Sw1%==1 Echo CheckDupesForAllAreas >> TosserScript.Fps
if %Sw2%==1 Echo Call Script2.Fps >> TosserScript.Fps
Echo Call RESCAN.FPS >> TosserScript.Fps
----------------------------------------
Если в инбаунде были аpкмыловые пакеты, то файл TosserScript.Fps выглядит так:
-------------- TosserScript.Fps --------
; Automatically generated inbound processing script
Call Tossing.fps
Show Mailer
Checkinbound
System Move /y E:\Fido\Inbound\*.tic E:\Fido\Inbound\Tic
Нide Mailer
CheckDupesForAllAreas
Call Script2.Fps
Call RESCAN.FPS
----------------------------------------
Bye, , 14 октябpя 15
---
|