Finding first file 
Author Message
 Finding first file

Hy,
i've a big problem : in my office there is a Siemens Nixdorf computer with
Quattro Niros 3.3 operative system (is it something eatable ? ;-) ) connect
to our lan. This system has a FTP server.
With VB I need to connect to this FTP and get all files whose name start
with 'AY'.
Pls note that this system doesn't support directory and it has 7 logical
unit, and the files are accessed giving the UL/filename (for example
5/AY97884W.GOA).


If I exec the findfirst file

Dim bret%, herror&, hFile&, i%, nfile$
Dim pdata As WIN32_FIND_DATA, a As Boolean
pdata.cFileName = String(230, 0)
hFile = FtpFindFirstFile(hconnection, "05/*", pdata, 0, 0)

in this way i have the list of all file on UL logic unit and then with the
internetfindnext

  bret = InternetFindNextFile(hFile, pdata)
  herror = Err.LastDllError
  If bret <> 1 Then
    If herror = ERROR_NO_MORE_FILES Then

I hv to examine manually all the file on this logical unit  and check if
they start with AY.
The problem is that when I exec the first findfirstfile it took more than 5
minute and in add it slow the other system.

 I tried to use the
hFile = FtpFindFirstFile(hconnection, "05/AY*", pdata, 0, 0)

but they alway report that there is no files even if in the server they
exist.
Does anybody know how to solve this problem ? is there any special flag I
can use with findnext,findfirst,openconnection that can solve my problem ?

If i open a dos session and run ftp, after connection if i give command dir
5/ay* I can see only the files that actually start with ay on lu 5.

Many thanks in advance.
Best regards
Fiammenghi Fabrizio



Sun, 22 Apr 2001 03:00:00 GMT  
 Finding first file
Hi,

It is also the same wacky when I worked with MVS system FTP server,
I had to program a File Manager-like dialog for the MVS dataset Browsing and
Open and Save,
But I cannot get wild character working through WinInet - the trick I played
is:

If I intend to list AY*, I would have to give a *AY* file pattern. Then
filter the returning file list myself.
I suppose WinInet will not take AY* as a file pattern but as a regular file!
Another wacky thing is:
If I try to list a file list with only one file, I will get a duplication .

Of course, it will not happy if I use FTP command.

I have to take it because it is a little bit more work if I choose to use
Socket and FTP protocol.
(Actually I did use Socket for some case, because I can never QUOTE a FTP
PROTOCOL COMMAND
through WinINet!)

Quote:

>Hy,
>i've a big problem : in my office there is a Siemens Nixdorf computer with
>Quattro Niros 3.3 operative system (is it something eatable ? ;-) ) connect
>to our lan. This system has a FTP server.
>With VB I need to connect to this FTP and get all files whose name start
>with 'AY'.
>Pls note that this system doesn't support directory and it has 7 logical
>unit, and the files are accessed giving the UL/filename (for example
>5/AY97884W.GOA).


>If I exec the findfirst file

>Dim bret%, herror&, hFile&, i%, nfile$
>Dim pdata As WIN32_FIND_DATA, a As Boolean
>pdata.cFileName = String(230, 0)
>hFile = FtpFindFirstFile(hconnection, "05/*", pdata, 0, 0)

>in this way i have the list of all file on UL logic unit and then with the
>internetfindnext

>  bret = InternetFindNextFile(hFile, pdata)
>  herror = Err.LastDllError
>  If bret <> 1 Then
>    If herror = ERROR_NO_MORE_FILES Then

>I hv to examine manually all the file on this logical unit  and check if
>they start with AY.
>The problem is that when I exec the first findfirstfile it took more than 5
>minute and in add it slow the other system.

> I tried to use the
>hFile = FtpFindFirstFile(hconnection, "05/AY*", pdata, 0, 0)

>but they alway report that there is no files even if in the server they
>exist.
>Does anybody know how to solve this problem ? is there any special flag I
>can use with findnext,findfirst,openconnection that can solve my problem ?

>If i open a dos session and run ftp, after connection if i give command dir
>5/ay* I can see only the files that actually start with ay on lu 5.

>Many thanks in advance.
>Best regards
>Fiammenghi Fabrizio



Mon, 23 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Finding first file

2. Finding first file

3. find first query problem with empty cell

4. DAO Find First Method

5. Finding first not-empty field

6. Find First

7. Find first day of week for date entered

8. Finding position of first character of postal code

9. Find The First Line In A Document

10. find the first line after scroll down

11. Find First

12. Find First Syntax for Integer Field

 

 
Powered by phpBB® Forum Software