>SALVE SONO NUOVO SIA DELLA MATERIA CHE DEL FORUM, MA HO TANTA
>VOGLIA DI CAPIRE LA MATERIA E IMPARARE.
>IL MIO PROBLEMA E CHE DURANTE IL GIORNO DALL'UFFICIO LANCIO PIU
>VOLTE UN ESEGUIBILE *.BAT CHE A SUA VOLTA ESEGUE UN APPLICATIVO
>CHE LEGGE UN FILE DI TESTO, PER POI MANDARE I DATI. MI SERVIREBBE
>AUTOMATIZZARE IL TUTTO.
>TIPO CHE A INTERVALLI PRESTABILITI SI LEGGA IL FILE DI TESTO
>SE E MODIFICATO, LANCI IL FILE BAT.
>SE AVETE ARGOMENTI O MANUALI DA LEGGERE O SUGGERIMENTI, SONO
>IN ATTESA. SALUTI.
Quando una volta lo schermo era nero e le lettere illuminavano parte dello schermo ... erano i tempi del pcp, del DOS, QBasic e GWBasic. Allora per i comuni mortali l'unico metodo economico per programmare erano i file batch.
Ora nessuno se li ricorda più.
Quando si dice "Nati con la camicia ..."
Rispolverando la memoria e spulciando in internet ho trovato questo esempio che fa al caso tuo.
@echo off
:: This batch file allows you to run programs on certain days.
:: Have this TODAY.BAT program CALLed from your AUTOEXEC.BAT.
:: TODAY.BAT will read entries in a TODAY.INI file you must make.
:: The entries in the TODAY.INI should look like this:
:: 10-12-1999=DeleteOldDocs.bat
:: 10-13-1999=Scandisk.bat
:: 10-14-1999=PrintReports.bat
:: Put the date into the DATE environment variable
:: Response to DATE command should be like
:: Current date is Sun 10-12-1997
:: Enter new date (mm-dd-yy):
@echo.|date|find /i "current">#urrent.bat
@echo set date=%%4>current.bat
call #urrent.bat
del ?urrent.bat
:: Put the command for today into TODAYSCOMMAND variable
:: Assumes existence of TODAY.INI in current directory
find "%date%=" today.ini | sort /r | date | find "=" > en#er.bat
@echo set todayscommand=%%5> enter.bat
call en#er.bat
del en?er.bat > nul
:: Cleanup - delete DATE variable and INI entry (so it only runs once)
type today.ini|find /v "%date%">today.ini
set date=
:: Run today's command
call %todayscommand%
set todayscommand=
:: _____________________________________________________
:: If the command for the day requires user input, for
:: example, you have to hit enter or answer yes or no,
:: you should run a separate batch file instead of
:: running the command directly. Assume you want to run
:: CHKDSK with the /F option to fix errors. If it finds
:: errors, it will ask you to type "y" or "n". You can
:: create a batch file which will do this for you:
:: ECHO Y|CHKDSK /F
:: If all you need is to press "Enter", you can do this:
:: ECHO.|CHKDSK /F
:: If you need to press "y", AND THEN HIT "Enter", it
:: gets more complicated. You have to create what is
:: generally called a "script" containing the exact
:: keystrokes you need to press. You can create it
:: ahead of time, or as needed like this:
:: ECHO Y>SCRIPT.TXT
:: ECHO.>>SCRIPT.TXT
:: TYPE SCRIPT.TXT|CHKDSK /F
:: Notice the first line had only one ">", but the
:: second line had two ">>". Just one will cause
:: the SCRIPT.TXT to be created new (if it already
:: exists, it will be erased to start over fresh).
:: The two >> will cause things to be appended to
:: the existing SCRIPT.TXT