I don't understand.... since one day i try to remove a file, with DeleteFTPFile() without succes
Since the beginning and always now, i read in the doc : "you must change the current directory and not write a full path"
I have asking to AI and it say to me, write this (with full path) :
Code: Select all
Chemin$ = "/var/www/MyCreations/Sites/Public/MySite/Dev/Sources/Php/"
IdSftp = OpenFTP(#PB_Any, "sftp://" + IP$, Login$, Mdp$)
If IdSftp
If Not DeleteFTPFile(IdSftp, Chemin$ + "kcc.txt")
Debug "Erreur"
EndIf
EndIff
Then when i do that, like FRED say to do (Changing current directory)
Code: Select all
Chemin$ = "/var/www/MyCreations/Sites/Public/MySite/Dev/Sources/Php/"
IdSftp = OpenFTP(#PB_Any, "sftp://" + IP$, Login$, Mdp$)
If IdSftp
MaxParts = CountString(Chemin$, "/") + 1
For i = 1 To MaxParts
Part$ = StringField(Chemin$, i, "/")
SetFTPDirectory(IdSftp, Part$)
Debug GetFTPDirectory(IdSftp)
Next
If Not DeleteFTPFile(IdSftp, "kcc.txt")
Debug "Error"
EndIf
EndIfAnd that not works/
/var/
/var/www/
/var/www/MyCreations/
/var/www/MyCreations/Sites/
/var/www/MyCreations/Sites/Public/
/var/www/MyCreations/Sites/Public/MySite/
/var/www/MyCreations/Sites/Public/MySite/Dev/
/var/www/MyCreations/Sites/Public/MySite/Dev/Sources/
/var/www/MyCreations/Sites/Public/MySite/Dev/Sources/Php/
/var/www/MyCreations/Sites/Public/MySite/Dev/Sources/Php/
Error
This time...i'm really lost...what i must to do exactely ?
Have a good day

