I figured it out... the correct code was...
c eval rc = ftp_list(fd: 'inbox/*': 1000:
c %addr(incoming): num_files)
but After debuging it, i noticed the "incoming" doesn't retain the path, the files were stored, so I had to add the 'inbox' to the Get Routine...
c if ftp_get(fd: 'inbox/'+incoming(fileno):
c '/ediftp/mckesson/inbox/'+
c incoming(fileno))>=0
c eval gotfiles = gotfiles + 1
And now it works...
tim
-----Original Message-----
From: Hatzenbeler, Tim [SMTP:thatzenbeler@xxxxxxxxxxxxx]
Sent: Thursday, July 03, 2003 4:37 PM
To: 'ftpapi@xxxxxxxxxxxxx'
Subject: ftp help...
Programming question :-)???????
I have a directory that looks like this...
+as2box (dir)
+->mckesson (dir)
++->inbox (dir)
+++->edifile#1.txt
+++->edifile#2.txt
++->inboxarchives (dir)
I would like to download the files from inbox, but be in the working directory of mckesson.? is this possible using the ftp_list command?
I tried this..
?? if??????? ftp_chdir(fd: 'as2box/mckesson/') < 0?
....
followed by...
c?????????????????? eval????? rc = ftp_list(fd: '/inbox/*': 1000:???
c?????????????????????????????????? %addr(incoming): num_files)??
According to the source code comments, it looks like I can use a path parameter, with a wildcard pattern.
But the list command bring back 0 in the num_files.? I tried this with and without the front (/) but it didn't seem to make a difference.
Is this possible?? or do I have to be in the directory of the files I want to download?
The reason, i'm not going into the directory, is because it make it easier to move the files from inbox to inboxarchives after it's been get'ed.
? rename inbox/edifile#1.txt inboxarchives/edifile#1.txt???
Thanks, tim
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information.? Any unauthorized review, use, disclosure or distribution is prohibited.? If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.