Jump to content

Recommended Posts

Posted (edited)

i have write this code so far....it's only an extract

$server ='my server'
$username ='my username'
$pass = 'my password'
$location = 'with this create a folder where i save the file'
$dllhandle = DllOpen('wininet.dll')
$port='21'

 
 
$Open = _FTPOpen('MyFTP Control')
$Conn = _FTPConnect($Open, $server, $username, $pass)
_FTPMakeDir($Conn,$destination)
$Ftpp = _FTPPutFolderContents($Conn, @MyDocumentsDir & '\And here the folder that have selected', $location,0)
$Ftpc = _FTPClose($Open)

with this code i can upload the content of the folder that i have selected, but if there is a sub-folder, upload the folder empty......i would upload all file.

p.s sorry for my english

Edited by pdinillo
Posted (edited)

Not sure what FTP UDF you're using...maybe try using the 'official' one bundled with the installer:

#Include <FTPEx.au3>

$server ='my server'
$username ='my username'
$pass = 'my password'
$location = 'someFolder'

$Open = _FTP_Open('MyFTP Control')
$Conn = _FTP_Connect($Open, $server, $username, $pass)
_FTP_DirCreate($Conn,$location)
$Ftpp = _FTP_DirPutContents($Conn, @MyDocumentsDir & '\And here the folder that have selected', $location,1)
$Ftpc = _FTP_Close ($Open)
Edited by evilertoaster
Posted

@pdinillo, just use evilertoaster example script and it will work fine.

I think you only want to upload files and directory structure (no recursive) so just a little modification to evilertoaster script, change flag 1 to 0 in _FTP_DirPutContents function.

Posted

Why did you report this thread only to say "solved"? In the future please don't waste our time reporting threads that do not need reported.

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
  • Recently Browsing   0 members

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