On Sep 9, 2009, at 3:01 AM, Kevin Stallibrass wrote:
Hi all,
Had no takers on this one so I thought I'd repost it....
I have a problem where:
Put fld "contains FTP path" into tURL
libURLftpUploadFile "c:/myfile.txt", tURL ,"showStatus"
works fine but.
Put fld "contains FTP path" into tURL
Put "c:/myfile.txt" into tFilepath
libURLftpUploadFile tFilepath, tURL , "showStatus"
Results in "c:/myfile.txt" instead of the correct data being written
into
the uploaded text file
The same happens if I use libURLftpUpload
So, is it not possible to use 2 variables? Or am I missing something
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
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution