PDA

View Full Version : FTP copy command



GalacTek
10-18-2004, 09:33 AM
In AP5 or SF6/7

Is their anyway to place files on an FTP or website directory then do a compare to the local file and website files and only download the newer files from the website.

I kinda have this in place now. SF looks at webpage:

<SUF60>%exedate%</SUF60>
<%exedate%>10-15-2004</%exedate%>

compares the exedate to a date in an ini on the local machine and only downloads if the web setup is newer.

I have looked at TrueUpdate and VisualUpdate products, but those seem to be based on builds. We have many files and sometimes a client only needs to download 1 file or 20 files.

What I am looking for is something like xcopy http://www.galactek.com/downloads/ *.* /d

I know that is not a real command, but should give the idea.

Josué Alba
10-18-2004, 10:09 AM
Well you always can download the file and compare the date on it. or the version if aplicable.

you can check the File.GetAttributes action

you can compare the CreationDate and WriteDate

GalacTek
10-18-2004, 10:13 AM
Problem is we are trying to cut down on download overhead since many clients are still dial-up. They have to download a 27 meg file to find out they only needed to update a 1k file.

Josué Alba
10-18-2004, 10:17 AM
May you can try to make a log file. Download time of this file is aboput 5 sec in any band. Just create a log on the installation and a log on the network. compare and you're done.

Now may the app is already distributed, then you may use the File.GetAttributes on the local machine and read the log on the network.

if you could give us more info about the aplication (local) and the kind of updates, may I get a better advice 4 you.

GalacTek
10-18-2004, 10:30 AM
Well we have never made our clients load updates in consecutive order which means we have no idea what they need when they hit the website. Could be all the updated files or just one. That is why I was looking for a LUA xcopy type command that would only make the user download the newer files they are missing based on date. I'll do some hard thinking on the file log idea and see what I come up with.. Thanks.

Josué Alba
10-18-2004, 10:35 AM
Well we have never made our clients load updates in consecutive order which means we have no idea what they need when they hit the website. Could be all the updated files or just one. That is why I was looking for a LUA xcopy type command that would only make the user download the newer files they are missing based on date. I'll do some hard thinking on the file log idea and see what I come up with.. Thanks.

Ohoho well what about making a log of all the available updates and pass the right ones.

I'll think about this, sounds challenging.

I'll try to make a sample updating app.

GalacTek
10-18-2004, 10:45 AM
What I was thinking is being able to put all the files in a folder a website that way I don't have to create new builds everytime I get a new file from the development team. Sometimes I get 1-4 files aday at different times and have to do the builds, upload to website and it is time consuming. I was also thinking of using the AP for this intead of SF. That is why I posted in this forum.

Josué Alba
10-18-2004, 11:02 AM
I think the log file is still a good option

csd214
10-18-2004, 11:48 AM
Shawn,
Are you able to compare the dates on your local system with the dates on the server (Unix maybe)? (I'm not).

I think Josué Alba's suggestion is the best one. Some years ago I had a log file like that on the server:

File;Ver;Date;Size;CRC;DwnLdFile;Info
PAW.EXE;2001.3;03.03.2002;2313473;2004378666;Setup _plusAVSKRIV.EXE;Check CRC
Arbeidsstasjon;2001.4;30.12.2001;672835;<CRC>;Setup_PAW_Arbeidsstasjon.exe;Check Registry Key 'ServerVer'
CSD_WebSjekk.exe;1.2;07.01.2002;<Size>;<CRC>;Setup_CSD_WebSjekk.exe;Check Registry Key 'EXEVer'
IRP;ver;10.02.2002;size;CRC;Setup_IRP.exe;Cann't check (MS Office files)
PALOV;2002;Date;Size;CRC;PALOV.DBF;Download without checking

I used a checking technique appropriate to the file in question (have a look at 'Info' in the log file). (I never used the CRC value.)

Don't forget; like I did; that if you have a Unix server, the end of line characters are different on Unix/Windows systems.

I created my app with Setup Factory 6. Today you can use both AMS and SUF (with the Lua scripting engine). Personally I would prefer SUF7.

Good luck!