EXEC command
-
Tuesday, March 20, 2012 6:53 AM
Hi,
I am trying to remove some subfolders from the main folder using exec command:
<Exec command="FOR /R $(DirLocation)\$(MySourceCodePath)_$(Version) %%i IN (bin) DO rmdir /S/Q %%i"/>
<Exec command="FOR /R $(DirLocation)\$(MySourceCodePath)_$(Version) %%i IN (debug) DO rmdir /S/Q %%i"/>
Here the subfolders "bin" and "debug" are removed from the main folder: $(DirLocation)\$(MySourceCodePath)_$(Version) i.e.
e:\MysourceCode_1.1.110. It works fine. I have a lot of main folders starting from name: e:\MysourceCode_ .The version after this name is changed for each folder. How do i remove from all folders these subfolders.
Thanks,
All Replies
-
Tuesday, March 20, 2012 2:49 PM
You might want to check out the msbuild extension pack or the msbuild comminity tasks. In your case, the Folder task from the msbuild extension pack probably does exactly whet you need if you combine it with a filespec such as"e:\mysource_*"
My blog: blog.jessehouwing.nl
- Marked As Answer by John QiaoMicrosoft Contingent Staff, Moderator Monday, March 26, 2012 8:02 AM
-
Wednesday, March 21, 2012 6:52 AMModerator
Hi Twikle123,
Thanks for your post.
To remove subfolders using exec command, I suggest you to post it at http://social.msdn.microsoft.com/Forums/en-US/msbuild/threadsfor the better response.
John Qiao [MSFT]
MSDN Community Support | Feedback to us

