:: Batfile #1
set /P dirname=Type directory name: %=%
if "%dirname%"=="" goto input
type %0 | find /i " " | find /v "Notme" >ftp_.bat
type %0 | find /i "file.txt" | find /v "Notme" >pingtracert.bat
:: 2. create a pingtracert.bat with an output .txt file going to the folder that was created in number 1
:: already have that as that is easy when in a separate script, but getting it to the main INSTALL.BAT is driving me crazy. this script will be run every hour so i put a timestamp to separate th results inside the txt file.
echo %date% %time% >> File.txt
Ping 10.1.1.100 >> File.txt
ping 10.1.1.200 >> File.txt
:: 3. create an ftp.bat that will copy the .txt file to an ftp server.
:: I saw one in the internet an it works fine, and it is below
ECHO %UserName%> %Commands%
ECHO %Password%>> %Commands%
ECHO mput *.txt >> %Commands%
ECHO close >> %Commands%
ECHO bye >> %Commands%
FTP -d -i -s:%Commands% %Server%
REM Clean up.
IF EXIST %Commands% DEL %Commands%
Above should do everything you wanted expect creating a windows scheduled task .
Make sure to include all spaces as they are...
After this line ":: I saw one in the internet an it works fine, and it is below" there are
5 space each line..
I dont think windows task scheduler command "AT" gives an option to scheulde a task each few hrs...on which OS you would like to run this script ? XP or Win7 ?