....5...10...15...20...25...30...35...40...45...50...55...60
1 'test1.txt '
61 ' '
121 ' '
181 ' '
241 ' '
> EVAL incoming(2)
INCOMING(2) =
....5...10...15...20...25...30...35...40...45...50...55...60
1 ' test2.txt '
61 ' '
121 ' '
181 ' '
241 ' '
I don't know how well this will show up... but, I have a directory with 2 entries... and when i debug incoming(1) the test1.txt starts at position 1 of the string, but on incoming (2) the test2.txt starts at the 2nd position of the field incoming(2)= ' test2.txt'
I used, D Incoming S 255A DIM(1000) for my definition, and
eval rc = ftp_list(fd: 'inbox/*': 1000:
%addr(incoming): num_files)
to populate my list... Also, i re-ran this with 4 files in the directory, and each time, there as another additional space before the filename.
incoming(3)= ' test3.txt'
incoming(4)= ' test4.txt'
Thanks, tim Also, I'm using the version of the ftpapi, that I was able to download on 7/3/2003
-----Original Message-----
From: Hatzenbeler, Tim [SMTP:thatzenbeler@xxxxxxxxxxxxx]
Sent: Thursday, July 03, 2003 4:55 PM
To: 'ftpapi@xxxxxxxxxxxxx'
Subject: never mind...RE: ftp help...
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.
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.