using xcopy to check for latest release

Hi
I once knew someone who had a little batch file which was used when the user wanted to run their application.

What it did was check for a latest version of the program exe on a server folder and if there was a newer one it overwrote the the local exe but if not then it just ran the local exe.

I know it used xcopy,

I am looking to do this, dcan anybody point me in the right direction or have such a thing

many regards


steve
LVL 1
davomanAsked:
Who is Participating?
 
bruintjeCommented:
you can also use Replace in a bat file

open notepad
paste this

@ECHO OFF
REPLACE c:\source\*.* c:\dest /U
:END

save it as myreplace.bat

using the /U switch it will copy only files from the source folder to the dest folder that are newer, so if this is for an exe only then i think it will do the job
0
 
bruintjeCommented:
Hello davoman,

you could look at click once publishing, we found it here by chance but it works quite well
source: http://msdn2.microsoft.com/en-us/library/31kztyey.aspx

hope this helps a bit
bruintje
0
 
davomanAuthor Commented:
Hi thanks for that, its not right for this application howver
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
bruintjeCommented:
0
 
bruintjeCommented:
if this is a windows forms application why not use click once publishing? if you want to check the server for updates the client takes care of that on starting up just as you wanted but there is probably some other reason
0
 
davomanAuthor Commented:
Ok the biggest reason is that it is a 2003 not a 2005 application which means click once is not available, also XCOPY deployment is not needed here, just a simple batch file which xcopies the exe from a server if it is newer
0
 
bruintjeCommented:
now i understand why you came up with xcopy its a DOS command also

xcopy c:\src\*.* "d:\my dest\*.*" /s /y

will copy the complete scr folder to my dest on d
0
 
davomanAuthor Commented:
will that check for newer version, thats the point of this if the file is newer on the server than the local exe then overwrite it
0
 
davomanAuthor Commented:
thats brilliant thanks a lot
0
 
bruintjeCommented:
thank you :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.