Jemboy Posted August 21 Share Posted August 21 I am trying to download a zip-file from my FTP server. $Ftpp = _FTP_FileGet($Conn, '/tecweb/prod/1001/x64/tecweb1001.zip', 'C:\Program Files"\tecweb\tecweb1001.zip', False, 0, $FTP_TRANSFER_TYPE_BINARY) $Ftpp = _FTP_FileGet($Conn, '/tecweb/prod/1001/x64/tecweb1001.zip', 'D:\tecweb1001.zip', False, 0, $FTP_TRANSFER_TYPE_BINARY) The first line is my "original" line, however that line produces an -1 error (with extended error: 5) The second line (changing the target to drive D:) works. So I tried encapsulating the target with extra quotation marks "'text'" (single around double) and "'text'" (double around single quotes). Both did't work. I also replaces "Program Files\tecweb\" with "Progra~1\tecweb\" but this also does not work. Does any fellow autoit scriptors have an idea ? (I am planning to dive into FTPEx.au3 tomorow or friday, to see if I find out why _FTP_FileGet is behaving like this) 🙂 Link to comment Share on other sites More sharing options...
Developers Jos Posted August 21 Developers Share Posted August 21 'C:\Program Files"\tecweb\tecweb1001.zip' Why is there a doubleqoute in the string? Does the script have write access as in general the "C:\program Files" requires admin rights? Jemboy 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Jemboy Posted August 21 Author Share Posted August 21 The doublet quote is a left over from testing and should be removed. The script does not require admin rights, because the user has modify rights in on the tecweb subfolder. I could however run the script with #require admin to be sure it isn't a security issue after all... Thanks for the suggestion.🙂 Link to comment Share on other sites More sharing options...
Jemboy Posted August 22 Author Share Posted August 22 @JosThanks for pointing me in the right direction. It was indeed a rights problem. I normally have an installer creating the tecweb folder in Program Files and adjusting the rights. In this case however (because I was programming/testing) I must have created the tecweb folder manually and forgot set the security. After changing the folder permission to "change" for the logged in user, I was able to copy the file from FTP without a problem. Thanks again for your help! Link to comment Share on other sites More sharing options...
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