@echo off del f:ftpcfg.txt echo open 192.168.123.2>f:ftpcfg.txt echo WMS>>f:ftpcfg.txt echo WMS>>f:ftpcfg.txt echo lcd F:WMS_BAK>>f:ftpcfg.txt echo prompt>>f:ftpcfg.txt echo binary>>f:ftpcfg.txt forfiles /p F:WMS_BAK /d +%date:~0,-3% /c "cmd /c echo mput @file>>f:ftpcfg.txt" echo bye>>f:ftpcfg.txt F: cd F: C:windowssystem32ftp.exe -s:ftpcfg.txt exit