@echo off
echo.
echo ----------------------------------------------
echo Uploader des fichiers automatiquement
echo Note : en cas d'échec, regarder votre firewall
echo ----------------------------------------------
echo.
echo ==================
echo Time : %time%
echo ==================
echo Upload des fichiers en cours...
REM ==================================
REM Paramètres
REM ==================================
set HOTE_DISTANT=ftpperso.free.fr
set USER_1=xgangand
set FICHIER_CONTENANT_LE_PASSWORD=pwd_ftp1
set DOSSIER_DESTINATION=php
set fichier1=test01.php
set fichier2=script.php
REM ==========================================
REM Inscription des paramètres dans le fichier
REM passé à la commande ftp.exe
REM ==========================================
if exist $$tmp$$.txt del $$tmp$$.txt
echo open %HOTE_DISTANT%>> $$tmp$$.txt
echo %USER_1%>> $$tmp$$.txt
type %FICHIER_CONTENANT_LE_PASSWORD% >> $$tmp$$.txt
echo bin >> $$tmp$$.txt
echo cd %DOSSIER_DESTINATION% >> $$tmp$$.txt
echo put %fichier1% >> $$tmp$$.txt
echo put %fichier2% >> $$tmp$$.txt
echo by >> $$tmp$$.txt
REM ==================================
REM Lancer de la commande automatique
REM ==================================
ftp -s:$$tmp$$.txt -i > nul
echo.
echo ==================
echo Time : %time%
echo ==================
echo Upload fini.
del $$tmp$$.txt