Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How 2 create an update.bat

Status
Not open for further replies.

1x2z3

Programmer
Sep 18, 2003
39
0
0
ZA
Hi their, how do i create an update.bat for changes that i made to an application in VS 2003/2005, so i can just run the update file to update the applications changes made.
 
I don't know how to do it from within Visual Studio, but I can show you how I make backup copies of a development directory using a batch file to back up to a flash drive.

R: is where my flash drive is located, but you can use any drive or Zip drive.

Create a batch file called BackUpToUSB.bat
Add the following code using your own directories:

-------------------------------------------------
echo off
cls
echo Backup e:\VS 2005 Projects\Purchase VB directory to USB drive
echo Make sure Kingston USB drive is connected...
pause

R:
cd "\VS 2005 Projects\Purchase Business Objects VB"
xcopy "E:\VS 2005 Projects\Purchase Business Objects VB" /c /d /e /i /y

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort

R:
cd "\VS 2005 Projects\Purchase VB"
xcopy "E:\VS 2005 Projects\Purchase VB" /c /d /e /i /y

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort

R:
cd "\VS 2005 Projects\Purchasing\StoredProcedures"
xcopy "E:\VS 2005 Projects\Purchasing\StoredProcedures" /c /d /e /i /y

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort

R:
cd "\SQL_Backups"
xcopy "E:\SQL_Backups" /c /d /e /i /y

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort

echo .
echo Remove Kingston USB drive!
pause

if errorlevel 0 goto exit

:lowmemory
echo Insufficient memory to copy files or
echo invalid drive or command line syntax.
goto exit
:abort
echo You pressed Ctrl+C to end the copy operation.
goto exit
:exit
------------------------------------------------

You can then create a shortcut to this batch file.

You can reverse the process to update the files to another computer. I develop on three different computers, so this works well.

You can also backup using SyncToy from Microsoft.

On large directories I use Nero to go to CD's or DVD's.

If this is not what you are looking for just ignore.

CU


Tony Scarpelli
Clinical Engineering Dept.
Maine Medical Center
Portland, Maine 04102
 
Hi their thanx...

I'am new to VS2005. Doing maintanance on copany`s program.

This code is in the current update.bat file they used before :

xcopy \\sjsdc\Apps\BDRS\Current\*.* c:\progra~1\speer\bdrs\*.* /e/s/y
pause

It looks like all the files that is being installed on the Server must be updated to the pc i run the update on.

It does the update to the Server, but if i run the update on the other pc`s it does`nt work.

Can it, be because the pc is not correctly linked to the server, though all the data is saved directly from the pc`s to the server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top