WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinInet
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

iFtpFindInit Wildcards


Question:

I've just recompiled a script which downloads some files. It's too large to post, but here are the pertinent lines:
handle=iFtpFindInit(conhandle,currdir,strcat(prefix,"*"),@False,@False)
While 1
hostfilename=iftpfindnext(@True)
if hostfilename == "" then break
(download file, etc)
Endwhile
Prefix is set to something like "myfile" and then we download all files which begin with that prefix.

Using wwInt34i.dll, the wildcard included the dot before the extension so the lines above would return "myfile.txt", "myfile1" and "myfile1.txt".

With wwInt44i.dll, the wildcard seems to exclude the period. So "myfile1" is returned, but not "myfile.txt" nor "myfile1.txt".

I think I proved this by adding a period to the prefix so that it was "myfile." and then the code would download "myfile.txt" But obviously, now it won't download "myfile1.txt" or "myfile1".

(And of course, if I change the prefix to "myfile*." then I'll get "myfile.txt" and "myfile1.txt" but not "myfile1".)

My first question, of course, is if there's a new parameter or something else that I missed that will restore the old behavior for iFtpFindInit.

If not, then may I ask if this change is intentional? If so, then I need to rewrite the code. If the change is not, then I can recompile with wwInt34i and wait for a fix to the newer extender.

Which way should I proceed?

Answer:

That is expected behavior. As noted in the documentation:

Notes: The filename can be wildcarded. To match all files use '*', or to simply match files with extentions use "*.*"

You will need to do two seperate searches for files with extensions and files without extensions.


Article ID:   W16888
File Created: 2017:07:28:13:58:47
Last Updated: 2007:07:03:14:26:43