[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I change the 'Local Directory' on an AS/400 using ftpapi?
Sender: Scott Klement <klemscot@xxxxxxxxxxxx>
On Tue, 15 Oct 2002, Rusling, John B. (Alliance) wrote:
>
> I've used the ftp_chdir to successfully change the remote directory.
>
> I would like to change the local working directory.
>
You change your current directory using the standard OS/400 commands
and/or APIs for changing the current working directory. There's nothing
special about FTPAPI in this respect.
Here's IBM's documentation for the chdir() API:
http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/apis/chdir.htm
Here's a quick example:
H DFTACTGRP(*NO) ACTGRP(*NEW)
D chdir PR 10I 0 ExtProc('chdir')
D path * Value Options(*string)
D QCMDEXC PR ExtPgm('QCMDEXC')
D command 200A const
D length 15P 5 const
** Example of the chdir() API:
c if chdir('/usr/bin') <> 0
C* handle error here
c endif
** Example using the OS/400 CHGCURDIR command:
c callp(e) QCMDEXC('CHGCURDIR DIR(''/usr/bin'')':
c 200)
c if %error
C* handle error here
c endif
c eval *inlr = *on
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------