Tip

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.
 
  
@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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.