File transfer question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 78
- Joined: Sat Apr 17, 2010 9:21 am
File transfer question
Is it possible from within LiveCode to copy a file from a server to a pc.
I am updating runtimes regularly.
And put the runtimes on the server of the client.
The users on their pc's need to upload that new runtime.
It would be very userfriendly if by opening the old runtime it would automatically check for updates and then transfer the new runtime to the local folder on the pc.
Thanks
Rob van der Sloot
I am updating runtimes regularly.
And put the runtimes on the server of the client.
The users on their pc's need to upload that new runtime.
It would be very userfriendly if by opening the old runtime it would automatically check for updates and then transfer the new runtime to the local folder on the pc.
Thanks
Rob van der Sloot
Re: File transfer question
Dag Rob,
is this really a "Database" question?
Anyway, sure this is possible!
Check "load URL" or "liburldownloadtofile" in the dictionary.
Basically one could put a tiny text file on the server with (only) the version number of the EXE on the server in it.
Store the version number into a custom property of your apps.
Then download the small text file, check it against the stored version number and if there is a newer version on the server load that one to a folder on disk.
Hope that helps!
Best & groetjes
Klaus
is this really a "Database" question?
Anyway, sure this is possible!
Check "load URL" or "liburldownloadtofile" in the dictionary.
Basically one could put a tiny text file on the server with (only) the version number of the EXE on the server in it.
Store the version number into a custom property of your apps.
Then download the small text file, check it against the stored version number and if there is a newer version on the server load that one to a folder on disk.
Hope that helps!
Best & groetjes
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: File transfer question
What platforms does your app run on? And are these updates over the public Internet, or on an internal network?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 78
- Joined: Sat Apr 17, 2010 9:21 am
Re: File transfer question
The runtime stack is put on a local windows server and has to transferred to a windows 10 pc.
Its an internal network.
But I think it would be easier to put it on a FTP server.
With load URL, the file is put in the cache, but I want it in a specific folder where other files also are part of the whole system.
I tried this:
load URL "\\f-server\public\mams\Runtime\MAMS1.0\MAN1.0\Management.exe" with message "Done"
but nothing happens
Its an internal network.
But I think it would be easier to put it on a FTP server.
With load URL, the file is put in the cache, but I want it in a specific folder where other files also are part of the whole system.
I tried this:
load URL "\\f-server\public\mams\Runtime\MAMS1.0\MAN1.0\Management.exe" with message "Done"
but nothing happens
Re: File transfer question
Hi Rob,
since you mentoned "server" I immediately presumed you also mean a HTTP server, so "load" or "liburldownloadtofile" may fail in this case.
Try this (and use the forward slash, as Livecode uses this internally on ALL platforms):
Best
Klaus
since you mentoned "server" I immediately presumed you also mean a HTTP server, so "load" or "liburldownloadtofile" may fail in this case.
Try this (and use the forward slash, as Livecode uses this internally on ALL platforms):
Code: Select all
...
put url("binfile://f-server/public/mams/Runtime/MAMS1.0/MAN1.0/Management.exe") into url("binfile:C:/path/to_local/folder/Management.exe")
if the result <> EMPTY then
answer "Error:" && the result
end if
...
Klaus
Re: File transfer question
Code: Select all
put URL (http://www.example.com/myFile.jpg) into URL "binfile:/home/max/Documents/myFIle.jpg"
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- Livecode Opensource Backer
- Posts: 78
- Joined: Sat Apr 17, 2010 9:21 am
Re: File transfer question
Thanks a lot for the information.
I was a view weeks doing something else, but am back now on this project and with the binfile setup, it works just as I wanted.
All the best
Rob
I was a view weeks doing something else, but am back now on this project and with the binfile setup, it works just as I wanted.
All the best
Rob