Jump to content

Recommended Posts

Posted

Hey guys, I got a problem and rly need help.

I try using FTP to get a file. Then the content of the file on the FTP-Server is getting changed, and I'm downloading this file again. This works, but the content of the file after downloading it the second time is the same like before...doesn't matter if I open and close the ftp session, or using the same. If I'm using manually FileZilla to get the File it works without any probs.

#include <FTPEx.au3>; This line includes all the FTP functions you need. Open this file to see which functions contains exactly.

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

$Open = _FTP_Open('MyFTP Control')
$Conn = _FTP_Connect($Open, $server, $username, $pass)
$Ftpp = _FTP_FileGet($Conn, '/EDI-Archiv-CD/bin/Status.txt', 'C:\Users\mwenzel\Documents\proUSBPacker\Customers\Status.txt', False, 128, $FTP_TRANSFER_TYPE_ASCII) ;$FTP_TRANSFER_TYPE_BINARY
If @error Then ConsoleWrite("ERROR - " & @error  & " - " & @extended  & " - " & _WinAPI_GetLastErrorMessage() & @CR)
$Ftpc = _FTP_Close($Open)

MsgBox(0, "", "")

$Open = _FTP_Open('MyFTP Control')
$Conn = _FTP_Connect($Open, $server, $username, $pass)
;~ _FTP_FileGet($l_FTPSession, $s_RemoteFile, $s_LocalFile [, $fFailIfExists = False, [$dwFlagsAndAttributes = 0 [, $l_Flags = 0 [, $l_Context = 0]]]])
$Ftpp = _FTP_FileGet($Conn, '/EDI-Archiv-CD/bin/Status.txt', 'C:\Users\mwenzel\Documents\proUSBPacker\Customers\Status.txt', False, 128, $FTP_TRANSFER_TYPE_ASCII) ;$FTP_TRANSFER_TYPE_BINARY
If @error Then ConsoleWrite(

Please help me out guys. I need to get this finished :/

Posted (edited)

$Ftpp = _FTP_FileGet($Conn, '/path/Status.txt', 'C:\path\Status.txt', False, 0, $INTERNET_FLAG_RELOAD)

Nothing changed.

#Edit: Sry I put it on the wrong parameter ... seems like it works now. 

Danp2 - you're my hero, thanks so much!

Edited by MikeWenzel

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
×
×
  • Create New...