Jump to content
Sign in to follow this  

_FTP_FilePut not working on x64

Recommended Posts


can someone help with this snippet please..

func upload()
    $newsettingsfile = _Crypt_EncryptData($settingsfile, "encrypt", $CALG_RC4)
    $uploadfile = FileOpen(@TempDir&"\settings.txt", 2)
    FileWrite(@TempDir&"\settings.txt", $newsettingsfile)

    $server = 'xxxxxx'
    $username = xxxxxx'
    $pass = 'xxxxxx'

    $Open = _FTP_Open('File Upload')
    $Conn = _FTP_Connect($Open, $server, $username, $pass)
    _FTP_FileRename($Conn, "settings.txt", "settings-"&@YEAR&"-"&@MON&"-"&@MDAY&"--"&@HOUR&"-"&@MIN&"-"&@SEC&".txt")
    _FTP_FilePut($Conn, @TempDir&"\settings.txt", "settings.txt")

when function is called, everything works fine on windows xp and windows 7.. however when run under windows 7 x64 it renames the existing file on the server and settings.txt is created but it's always a 0 byte file with nothing in it.

I've tried eliminating the @TempDir in the _ftp_fileput line by testing with 'c:\temp\settings.txt' but same problem, 0 byte file..

I'd rather try and do this without including a 3rd party ftp utility.. tried searching but getting nowhere.

TIA :)

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.