Geeks With Blogs
TFS Austin Agile SCM Talk Visual Studio ALM Team Foundation Server Practice

I found that using a loop activity to build up a filtered list clutters up the build report with repetitions of activities inside the loop. I could write a custom activity to create the list. However, rather than have to write and maintain code, it’s possible to use the DOS DIR command in the Invoke Process activity.

First, because there is no dir.exe file, you must execute a windows shell. I used “cmd” as the FileName value. 

image

Then in the Arguments value I use the shell /c switch followed by the DIR  command. It’s also possible to exclude file types from the list.

String.Format("{0} ""{1}"" {2}",  "/c dir",  BinariesDirectory,  "/b  |findstr /vi "".zip""")

Posted on Tuesday, March 5, 2013 7:59 AM | Back to top


Comments on this post: Using the DIR command in the TFS 2010/12 Team Build Invoke Process Activity

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Bob Hardister | Powered by: GeeksWithBlogs.net | Join free