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 first published in August 2005

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close