Download your entire source to your PC

Here is a quick way to download the entire source from a file in a given library. Just call the bat file GETALLSRC with the parms. You will need a user profile that has FTP access to the system you want to download from.

Here is a quick way to download the entire source from a file in a given library. Just call the bat file GETALLSRC with the parms. You will need a user profile that has FTP access to the system you want to download from.
 
  
@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 last published in August 2005

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close