Francois Beaussier & Aymeric Gaurat Apelli

Thursday

TFS: removing _svn folders

I recently had the need to clean up a project in TFS. When it was imported, little care had been put in making sure that only the required files would be on source control.

The most noticable folders that were to be removed from TFS were: '_svn', 'bin' and 'obj'.

As I'm not a big fan of doing things manually (yes, even if doing it manualy is faster - well in that case it was probably faster to write the script) I ended up trying to remember how to do those fancy FOR loops in DOS :)

First, build a list all the folders (or files) you want to remove:

dir /s /b _svn bin obj > files_to_delete

Creating that file is handy and you can edit it before running the following query:

for /f "delims=" %g in (files_to_delete.txt) do tf.exe delete "%g" /login:DOMAIN\login,password

note: make sure that tf.exe is in your path, or replace it with the full path.

you can now refresh your pending checkin in visual studio and check it in !

1 Comments:

  • Every weekend i used to go to see this site, because i wish
    for enjoyment, for the reason that this this web page conations actually pleasant funny material too.


    Review my web-site; Stem Cell Threapy Cream Reviews

    By Anonymous Anonymous, at 5:02 pm  

Post a Comment

<< Home