joel.epsteinBUS31vi wrote:Code: Select all
put "http://www.projectiveart.com/PAapp/count/count.txt" into countURL
put URL countURL into tTempCount
put tTempCount into tNumberOfFiles
put tNumberOfFiles+1 into tNumberOfFiles
constant FTPHOST = "www.projectiveart.com"
constant FTPUSER = "{my user name}"
constant FTPPASS = "{my password}"
put tNumberOfFiles into URL "binFile:/count.txt"
put tNumberOfFiles into url ("ftp://" & FTPUSER & ":" & FTPPASS & "@" & FTPHOST&"/PAapp/count/count.txt")
If you check "the result" after the last statement, I'd guess that you'll find an error noting the URL is invalid.
The URL being used contains a service specifier of "http", but then you prepend that with a service specifier of "ftp", giving you:
Code: Select all
ftp://user:password@http://www.projectiveart.com/PAapp/count/count.txt"
If you remove the service specifier from the URL, you'd have:
Code: Select all
ftp://user:password@www.projectiveart.com/PAapp/count/count.txt"
...which is probably what you'll need.
Note that some servers are set up to use "www.*" only for HTTP access, so you may need:
Code: Select all
ftp://user:password@projectiveart.com/PAapp/count/count.txt"
Check the value of "the result" after that call for guidance; a good practice anyway, since all sorts of errors can occur during any client-server transaction, and checking "the result" will give you the opportunity to handle those gracefully.