Jump to content

Recommended Posts

Posted

is it possible to use an overwrite flag or something with FtpPutFile to overwrite a file on my ftp server?

i cant seem to find anything about it anywhere on the forums :/

Mads3n.dk
Posted

ah :/

I guess I'll just have to try combining FtpDelFile and FtpPutFile..

as far as i can see w0uter was meaning to include it in the UDF but apparently he never got it done.. sigh..

Mads3n.dk
Posted

If you are using these ftp functions here:

http://www.autoitscript.com/forum/index.ph...p;hl=FtpPutFile

There is an option for flags in the Upload function, it could be there.

I see it is using the wininet.dll so maybe you can find the optional flags.

wininet.dll reference:

http://cpan.uwinnipeg.ca/htdocs/libwin32/W..._remote_context

I would think overwrite would be the default action though.

Posted

yeah ive been looking there without any luck, sadly.

Im quite sure that it isn't the default action because my script works, but wont overwrite.. :/

Mads3n.dk
Posted

I'm looking at the upload function:

Func _FTPPutFile($l_FTPSession, $s_LocalFile, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)

    Local $ai_FTPPutFile = DllCall('wininet.dll', 'int', 'FtpPutFile', 'long', $l_FTPSession, 'str', $s_LocalFile, 'str', $s_RemoteFile, 'long', $l_Flags, 'long', $l_Context)
    If @error OR $ai_FTPPutFile[0] = 0 Then
        SetError(-1)
        Return 0
    EndIf
   

    Return $ai_FTPPutFile[0]
    
EndFunc ;==> _FTPPutFile()oÝ÷ Øay"¶wvËhmé¨v'ây×è­©¨­ç^±Êâ¦Ø¯yê뢶®¶­sdgVæ2ôeEWDfÆRb33c¶ÅôeE6W76öâÂb33c·5ôÆö6ÄfÆRÂb33c·5õ&VÖ÷FTfÆRÂb33c¶ÅôfÆw2ÒÂb33c¶Åô6öçFWBÒ ¢Æö6Âb33c¶ôeEWDfÆRÒFÆÄ6ÆÂb33·vææWBæFÆÂb33²Âb33¶çBb33²Âb33´gGWDfÆRb33²Âb33¶Æöærb33²Âb33c¶ÅôeE6W76öâÂb33·7G"b33²Âb33c·5ôÆö6ÄfÆRÂb33·7G"b33²Âb33c·5õ&VÖ÷FTfÆRÂb33¶Æöærb33²Âb33c¶ÅôfÆw2Âb33¶Æöærb33²Âb33c¶Åô6öçFWB£¶6V6²bFÆÆ6ÆÂ7GVÆÇ&WGW&ç2çFærÂFRb7FFVÖVçB&VÆ÷rÖvB&RvWGFærFRW'&÷"'WBFW&R6÷VÆB7FÆÂ&R6öÖWFær&WGW&æV@¢×6t&÷ÂgV÷C²gV÷C²Âb33c¶ôeEWDfÆU³Ò ¢bW'&÷"õ"b33c¶ôeEWDfÆU³ÒÒFVà¢6WDW'&÷"Ó¢&WGW&â¢VæD`¢¢&WGW&âb33c¶ôeEWDfÆU³Ð¢¤VæDgVæ2³ÓÒfwC²ôeEWDfÆR

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...