problems with libURLftpUploadfile

Kevin Stallibrass kevin at stallibrass.com
Wed Sep 9 12:22:00 EDT 2009


Thanks Jim,
This is really good advice which I'll try this evening. I does put me in a
bit of a quandary though as my original script now works just by changing
the variable name.(no idea why) This will probably fail at the worst moment
knowing my luck so I'll try your suggestion and report back.
Regards
Kevin Stallibrass

Jim Ault Wrote:

My quick guess is that you are seeing the following...

-1-
libURLftpUploadFile  "c:/myfile.txt", tURL ,"showStatus"

sending a string to be used by libURLftpUploadFile

-2-
libURLftpUploadFile  tFilepath, tURL ,"showStatus"

allowing the function to 'evaluate' the string inside the variable
This probably results in either
    empty if the file 'myfile.txt' does not exist
   the contents of myfile.txt read from the hard drive
-------
Try this variation
put "c:/" into tFilepath
put "myfile.txt" into tFilename
--now concatenate to form the param at the time of sending
libURLftpUploadFile ( tFilepath & tFilename), tURL ,"showStatus"

This is confusing, I know, but when working with interpretive  
languages, these nuances are part of the landscape.  They have their  
purpose since there are times when this is exactly what you want.   
Power programmers use this to their advantage when the literal path  
and filename is not known but discovered at runtime on different hard  
drives.

Hope this works for you.  Let us know.
If not I will do a little digging into the libURLftpUploadFile in the  
library to see how Rev uses the first param.

Jim Ault
Las Vegas




More information about the use-livecode mailing list