@ECHO OFF IF %1.==. GOTO problem IF %2.==. GOTO problem IF %3.==. GOTO problem IF %4.==. GOTO problem IF %5.==. GOTO problem cls ping %3 -n 2 | find /i "reply" >nul && goto getfils echo System does not exist on the network! & goto End :getfils cls F: cd cd sources md %3 cd %3 md %4 cd %4 md %5 cd %5 rename *.txt *.MBR ECHO open %3 >FTPSRC.TXT ECHO user %1 >>FTPSRC.TXT ECHO %2 >>FTPSRC.TXT ECHO ascii >>FTPSRC.TXT ECHO PROMPT >>FTPSRC.TXT ECHO QUOTE SITE NAMEFMT 1 >>FTPSRC.TXT ECHO MGET /QSYS.LIB/%4.LIB/%5.FILE/*.MBR >>FTPSRC.TXT ECHO quit >>FTPSRC.TXT ftp -n -s:FTPSRC.TXT DEL FTPSRC.TXT rename *.MBR *.txt GOTO END :problem cls ECHO ----------------------------------------------------- ECHO Type in : GETALLSRC USER PASSWORD SYSTEM LIBRARY FILE ECHO ----------------------------------------------------- ECHO USER = user profile to use for FTP ECHO PASSWORD = password for user profile to use for FTP ECHO SYSTEM = name of the system you wish to FTP from ECHO LIBRARY = name of the library you wish to FTP from ECHO FILE = name of the file you wish to FTP from :END
This was first published in August 2005