Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > Listing contents of multiple FTP directories on AS/400
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Listing contents of multiple FTP directories on AS/400

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


iSeries news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 28 April 2008
During an FTP session, I need to go to three directories on a remote system. I want to list out the contents of the directories for me to use later.

I know I can use the DIR (disk command, and it will put the data in *CURLIB/DIROUTPUT.DIROUTPUT, but it is a replacement, not an add, so I can only get one directory listing per FTP session.

I don't want to have to end the session, and restart it three times. Any suggestions? Am I missing something?


>
EXPERT RESPONSE
Using the DIR command, you would be using something like,

DIR direct1/*.* > DIROUTPUT.DIROUTPUT

The > symbol redirects the output to the file specified. This will, as you say, replace any data in the file. So, use this for the FIRST directory listing in your session, then for the OTHER two, use :

DIR direct2/*.* >> DIROUTPUT.DIROUTPUT
DIR direct3/*.* >> DIROUTPUT.DIROUTPUT

Using the > symbol twice means 'append the data to the file'.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
iSeries Application Development
Monitoring escape messages and using RCVMSG for diagnostic messages
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C
Searching fields for values
iSeries application display subfiles with other program windows
Searching part of a name or address in AS/400
Passing parameters in an ILE RPG module
What's happening to my subfile?
What happening to my subfile?
Passing parameters in an ILE RPG module

FTP
File transfer DTF "hooks"
SAVF FTP on AS400 LAN: 504 Binary image transfer required for save files
Transferring data via FTP on AS/400 systems
More tips for securing FTP on your System i
System i security: Watch for hackers using FTP
System i FTP: Fast guide to Redbooks and articles
System i crash course: FTP
PC/Windows connectivity: Top 10 expert Q&As
How to import an iSeries file
The iSeries and MS Office make good partners

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts