Jump to content
Sign in to follow this  
nugame

_FTPPutFile works at first

Recommended Posts

nugame

Developing FTP automation interface and it works fine on the first upload - upload after set directory. The set directory will create directory if not there. No problem. When I rerun, I get put file error 0 from the _FTPPutFile in the ftp_ex.au3 UDF. I had this working in the first development effort without the GUI and expansion. The ftp UDF showed default flag to "0". Where can I find the flag list that would allow me to overwrite the files. Looking in the Wininet.dll but nothing yet. If it is not flags then what? thanks.


Dr SherlockAlways a way

Share this post


Link to post
Share on other sites
martin

Developing FTP automation interface and it works fine on the first upload - upload after set directory. The set directory will create directory if not there. No problem. When I rerun, I get put file error 0 from the _FTPPutFile in the ftp_ex.au3 UDF. I had this working in the first development effort without the GUI and expansion. The ftp UDF showed default flag to "0". Where can I find the flag list that would allow me to overwrite the files. Looking in the Wininet.dll but nothing yet. If it is not flags then what? thanks.

I don't know what ftp_ex.au3 is but if you google "FtpPutFile function" the first result is msdn where it explained.

I'm not sure but maybe FTPPut will not overwrite a file unless you have the correct priveleges. Have you tried to delete the old file first with _FTPDeleteFile?


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
nugame

I did google including MSDN and still cannot find the flags information. I did this in my earlier development effort. It worked without deleting files on the ftp site. Even though the privilages were allready set, I did play with the privilages. Still dead end. I did the FTP through DOS prompt and overwrite is fine. I did delete then upload again and it worked as expected. After extensive research and having done this earlier in pre-development, I have the correct flow. I gotta be erred. keep trying. thanks.


Dr SherlockAlways a way

Share this post


Link to post
Share on other sites
nfaustin

I also have the same problem with duplicate files.

Kindly post if you have resolution on overwriting a duplicate file on server using only the flag..

Thanks.

Here my related post? http://www.autoitscript.com/forum/index.php?app=forums&module=forums&section=findpost&pid=716843


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites
nugame

The only thing about flags for ftpputfile is for conditions under which the transfers occur - namely ASCII, Binary, or unknown. Here is the link for this information - http://msdn.microsoft.com/en-us/library/aa384170(VS.85).aspx. So far, I see the InternetConnect function with numerous flag options. Same problem. I am using the FTP.au3 for my test on initial development. My current and major development, I have been using the FTP_EX.au3. I notice a different in the FTPconnect function in the way it handles flags for passive connection and the return seterror. It is showing SetError(-1 - @error). Looking to see if there is an update. Thanks.


Dr SherlockAlways a way

Share this post


Link to post
Share on other sites
nfaustin

I got a workaround for a duplicate files problem,

I just add more script to check if the filename already exist on server folder then delete it and upload the new one.

I believe this is the best way to implement so far...


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites
nugame

I have it working now. Doing a delete then upload is a work around but a good way when you may want or need to do a rather large number of files to FTP. Simply download the latest FTP USF by Yashied. You may have to modify the FTP functions and maybe some parameters, but it works like a charm. Yashied - thanks for the UDF improvements.


Dr SherlockAlways a way

Share this post


Link to post
Share on other sites
nfaustin

I got it now.

You're right, it works like a charm.. >_<

Many thanks to you and most of all

to Yashield and bchris01.


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

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  

×