Jump to content

Cannot delete files from FTP Server


Recommended Posts

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)

 

Link to comment
Share on other sites

  • Developers

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

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...