Okay :) det vil jeg huske :)
Jeg deler point'ene mellem os da det jeg fandt på google blev det jeg brugte i mit program - håber det er ok :)
For andre interesserede, så er det denne kode jeg fandt:
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _
(ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, _
ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA" _
(ByVal hFtpSession As Long, ByVal lpszFileName As String) As Boolean
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _
(ByVal hInternetSession As Long, ByVal sServerName As String, _
ByVal nServerPort As Integer, ByVal sUsername As String, _
ByVal sPassword As String, ByVal lService As Long, _
ByVal lFlags As Long, ByVal lContext As Long) As Long
lngINet = InternetOpen("MyFTP Control", 1, vbNullString, vbNullString, 0)
lngINetConn = InternetConnect(lngINet, "
ftp.minserver.dk", 0, "brugernavn", "password", 1, 0, 0)
blnRC = FtpDeleteFile(lngINetConn, StiTilFil)
Hvis filen bliver slettet korrekt, vil blnRC blive 1 ellers 0.
Håber andre kan få nytte af dette :)