|
Dave Wall wrote: > What error do you get when your CD to a folder fails? Make sure you are in > the system distribution directory. You cannot access folders unless you > are in the directory. Use WRKDIRE to display and update directory entries. What does "system distribution directory" mean? I think you may have misunderstood my question, I am doing this: String msg; boolean b; String[] files; int i; wms400 = new AS400("wms400", "java", "java"); ftp400 = new AS400FTP(wms400); try { ftp400.connect(); System.out.println("wd: " + ftp400.pwd()); msg = ftp400.issueCommand("SITE NAMEFMT 1"); System.out.println("result: " + msg); b = ftp400.cd("/QDLS"); // b = ftp400.cd("/java"); System.out.println("could cd? " + b); System.out.println("wd: " + ftp400.pwd()); files = ftp400.dir(); System.out.println(files.length + " files found:"); for (i = 0; i < files.length; i++) { System.out.println(files[i]); } } catch (Exception exc) { System.out.println(exc.getMessage()); System.exit(1); } and getting this output: wd: 257 "/" is current directory. result: 250 Now using naming format "1". could cd? true wd: 257 "/QDLS" is current directory. 0 files found: When I uncomment the ftp400.cd("/java") line instead, I get a proper directory listing of that directory in the IFS: wd: 257 "/" is current directory. result: 250 Now using naming format "1". could cd? true wd: 257 "/java" is current directory. 7 files found: GLENNH 69632 02/22/02 15:37:07 *DIR com/ GLENNH 491 06/14/01 15:09:29 *STMF WmsTest.class GLENNH 524 06/14/01 13:13:55 *STMF HelloWorld.class QSECOFR 208 06/14/01 13:12:36 *STMF HelloWorld.java GLENNH 161 12/27/01 10:12:18 *STMF HiWorld.java GLENNH 438 01/14/02 08:22:53 *STMF HiWorld.class GLENNH 61440 03/21/02 13:25:15 *DIR test/ -- ____________________________________________________________ Glenn Holmer gholmer@weycogroup.com Programmer/Analyst phone: 414.908.1809 Weyco Group, Inc. fax: 414.908.1601
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.