possy_99 Posted June 28, 2011 Posted June 28, 2011 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) FileClose($uploadfile) $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") _FTP_Close($Open) FileDelete(@TempDir&"\settings.txt") EndFunc 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now