Jump to content
Sign in to follow this  
Braese

FTP search a file on a specific path

Recommended Posts

Braese

Hi,

perhaps somebody can help me. I wanna update a file on a ftp server but sometimes pathsare various.

$where       = "/etc/"
$filename     = "test.prio"
    Local $h_Handle
    _FTP_DirSetCurrent( $Conn, $where )
    $test = _FTP_FindFileFirst( $Conn, $filename, $h_Handle )
    If @error Then
        MsgBox(0,"","error")
    Else
        MsgBox(0,"",$test[10] & "found")
    EndIf
    $FindClose = _FTP_FindFileClose($h_Handle)

So that works. But it can be happen that this file is under another path and not in /etc, so in example in /var/hello/ . Maximum i have 3 or 4 path to search. How can i loop through this and use the path where the file is found? Make a loop and search in /etc and if found use /etc. If not found go further and look at /var/hello and if found use path /var/hello. If not found go furhter and look in /var/test and if found use /var/test. And so on. Any help?

Greets

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×