mr_kirillov

Cannot delete files from FTP Server

3 posts in this topic

Hi guys.
Need help. I dont know why, but code cannot delete files from FTP. And it cannot rename files also. How to solve this problem?

Tried with different FTP services.

 

#include <FTPEx.au3>

$server = "site.ru"
$login = "login"
$password = "password"

    $qOpen = _FTP_Open('Total Commander (UTF-8)')
    If Not $qOpen Then
        ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & " " & "Не могу открыть фтп сессию" & @CRLF)
    EndIf

    $qConn = _FTP_Connect($qOpen, $server, $login, $password, 1)
    If Not $qConn Then
        ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & " " & "Не могу подключиться к ftp серверу" & @CRLF)
    EndIf

    _FTP_FileDelete ( $qConn, "http://site.ru/1.txt" )
    _FTP_FileRename ( $qConn, "http://site.ru/2.txt", "http://site.ru/3.txt")

    _FTP_Close($qOpen)

 

Share this post


Link to post
Share on other sites



2 minutes ago, Jos said:

Why do you have "http://site.ru/" in front of the filename?

Jos

lol. I did not think about this. Thanks! ;)

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