How to create one click update from bin/debug folder?

// July 15th, 2010 // Programming

Well, it’s really easy!

I don’t know about you, but I have huge problem with copying files from my debug folders. First of all, it’s annoying, and second of all it takes time.

I’m using Visual Studio 2010 .

I have Solution with 14 projects (yes, it’s big solution – actually it’s POS Sector Solution, one of our products for Clubs and Restaurants), and not all projects are referenced between themselves, so there is no way  to have all of .exe and .dll files in one Debug directory.

When there is tough day, i need to copy about 20 files from 5 directories for about 10 times in a day, and send them to my teammates for purpose of testing. All that ALT + TAB, CTRL + C, ALT + TAB, CTRL + V x 5 folders * 10 times = 45min / 1h lost every day.

To solve this, i created Batch file which copy all of files that i need, from Debug  to Update directory.

Here is example of batch file :

@echo off

copy “D:\projects\POS Sector\bin\Debug\POS.BusinessLogic.dll” “C:\UPDATE\POS.BusinessLogic.dll” /y
copy “D:\projects\POS Sector\bin\Debug\POS.DataAccess.dll” “C:\UPDATE\POS.DataAccess.dll” /y

print

You can have as many as you need copy statements, but they must be on new line.

@echo off on first line will prevent any commands in the batch file to be sent to the screen when executed.

/y param means overwrite existing file.

Here is how you create batch file

The same way you can create batch file which will backup your directory.

Do you have some tricks like this one, which are ease to do, but save a lot of time?

Leave a Reply