pulling all files, loopitem doesn't seem to limit - WeOnlyDo Discussion board

pulling all files, loopitem doesn't seem to limit (wodFtpDLX / wodFtpDLX.NET)

by scots, Thursday, January 30, 2014, 20:07 (3950 days ago)

Hi
I'm trying to only pull certain files from a site
so, I'm executing, the section below in the connected event

in_dir = capp_directory + 'jpmc\import\'
out_dir = '/Outbound/Encrypted/'
ole_ftp.object.getfiles(in_dir, out_dir, 1 )


then, I'm trying to limit what's pulled in the loopitem

if (match(remotefile,'DOCCTS.EFS.ACK2') = true) then
file_array[nbr_ftp_files] = remotefile
nbr_ftp_files = nbr_ftp_files + 1
Skip = false
else
skip = true
end if


It seems to be recording the proper files in the file_array
but, I'm still getting ALL the files downloaded
to the in_dir
Am I doing something wrong here?
I'm doing this in powerbuilder, and I have everything else working except this

pulling all files, loopitem doesn't seem to limit

by wodSupport, Thursday, January 30, 2014, 21:35 (3950 days ago) @ scots

Hi.

I assume you're referring to wodFtpDLX ActiveX, right? Problem here is that PowerBuilder doesn't like in/out arguments in LoopItem event, so even you have set Skip = True, it is ignored and never returned back to wodFtpDLX - simply because your environment doesn't support it.

But not all is lost. We made a workaround for that, so inside LoopItem event you can set Ftp1.ItemSkip = TRUE (undocummented property) to achieve the same.

Can you try that?

Kreso

pulling all files, loopitem doesn't seem to limit

by scots, Friday, January 31, 2014, 18:13 (3949 days ago) @ wodSupport

it's doesn't seem to like that
i tried both ole_ftp.itemskip = false
and ole_ftp.object.itemskip = false

ole_ftp is my active x control

if (match(remotefile,'DOCCTS.EFS.ACK2') = true) then
file_array[nbr_ftp_files] = remotefile
nbr_ftp_files = nbr_ftp_files + 1
Skip = false
ole_ftp.object.itemskip = false
else
skip = true
ole_ftp.object.itemskip = true
end if


i would paste or attached the pb screen, but I don't see where I can do that here

pulling all files, loopitem doesn't seem to limit

by wodSupport, Friday, January 31, 2014, 18:16 (3949 days ago) @ scots

Hi.

Can you be more specific what it means "it doesn't like that"?

You're using wodFtpDLX ActiveX, right?

Kreso

pulling all files, loopitem doesn't seem to limit

by scots, Friday, January 31, 2014, 18:45 (3949 days ago) @ wodSupport

received and error accessing external object property
itemskip in loopitem even of object ole_ftp
this happens during runtime

it's an ole control within powerbuilder defined as
wodftpdlx activex - version 3.1.2.634

if I try to do
ole_ftp.itemskip
it gives me an incompatible property
and, I can't compile

pulling all files, loopitem doesn't seem to limit

by wodSupport, Friday, January 31, 2014, 18:48 (3949 days ago) @ scots

I checked, ItemSkip is in there since 2005, but it's accessible only to set to True, and while you're inside LoopItem event. It cannot be used elsewhere, and can only be set to True.

It makes no sense to set it to False, since it's default value.

So maybe it is there, but it returns FAIL error.

Kreso

pulling all files, loopitem doesn't seem to limit

by scots, Friday, January 31, 2014, 18:58 (3949 days ago) @ wodSupport

well... that worked
I took the set to false out
only set it to true
and, it didn't give me an error this time.
I'll have to try it out again, and see what it pulls

is it false by Default when it goes into ItemLoop?
because I'm using getfiles... since I can't use wildcards
i only want to pull files that start with a certain string
and, I'm assuming that itemloop will get called for every file

pulling all files, loopitem doesn't seem to limit

by wodSupport, Friday, January 31, 2014, 18:59 (3949 days ago) @ scots

Yes, in LoopItem itemskip = false by default, since by default all files are transferred.

Kreso

pulling all files, loopitem doesn't seem to limit

by scots, Friday, January 31, 2014, 19:12 (3949 days ago) @ wodSupport

That worked

thanks for your help