Sign in to follow this  
Followers 0
xcxooxl

how can i use FTPMAKEDIR..

6 posts in this topic




By reading the documentation

;===============================================================================
;
; Function Name:    _FTPMakeDir()
; Description:      Makes an Directory on an FTP server.
; Parameter(s):     $l_FTPSession   - The Long from _FTPConnect()
;                   $s_Remote       - The file name to be deleted.
; Requirement(s):   DllCall, wininet.dll
; Return Value(s):  On Success - 1
;                   On Failure - 0
; Author(s):        Wouter van Kesteren
;
;===============================================================================

Func _FTPMakeDir($l_FTPSession, $s_Remote)
    
    Local $ai_FTPMakeDir = DllCall('wininet.dll', 'int', 'FtpCreateDirectory', 'long', $l_FTPSession, 'str', $s_Remote)
    If @error OR $ai_FTPMakeDir[0] = 0 Then
        SetError(-1)
        Return 0
    EndIf
    
    Return $ai_FTPMakeDir[0]
    
EndFunc ;==> _FTPMakeDir()

Share this post


Link to post
Share on other sites

;===============================================================================

;

; Function Name: _FTPMakeDir()

; Description: Makes an Directory on an FTP server.

; Parameter(s): $l_FTPSession - The Long from _FTPConnect()

; $s_Remote - The file name to be deleted.

; Requirement(s): DllCall, wininet.dll

; Return Value(s): On Success - 1

; On Failure - 0

; Author(s): Wouter van Kesteren

;

;===============================================================================

Func _FTPMakeDir($l_FTPSession, $s_Remote)

Local $ai_FTPMakeDir = DllCall('wininet.dll', 'int', 'FtpCreateDirectory', 'long', $l_FTPSession, 'str', $s_Remote)

If @error OR $ai_FTPMakeDir[0] = 0 Then

SetError(-1)

Return 0

EndIf

Return $ai_FTPMakeDir[0]

EndFunc ;==> _FTPMakeDir()

; $s_Remote - The file name to be deleted. ..?

i dont want to delete file.. i dont under stand it

i tryd doing somthing like this

$server = '*******'

$username = '********'

$pass = '********'

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

$Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/somedir/Example.exe')

$Ftpc = _FTPClose($Open)

DllOpen ( "wininet.dll" )

$s_Remote = "WOOOOOT"

_FTPMakeDir($Conn, "New_Directory )

and it doesnt work

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

well first of all "New_Directory doesnt have a closing ". second thats wrong. $s_Remote should be the file to delete. not sure why but thats how it works.

_FTPMakeDir($Conn, "test.txt")

Please use

[code]
tags to show long lines of code Edited by Mast3rpyr0

Share this post


Link to post
Share on other sites

what...? I dont understand .. well how can i make this work

please somone who knows answer here how can i make it make a new directory

on the ftp server

Share this post


Link to post
Share on other sites

hay please dont forget me here :rolleyes:

help!

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  
Followers 0