Msbuild - how to delete folder contents but not folder itself?

前端 未结 2 1510
挽巷
挽巷 2021-01-17 10:32

Right now in my msbuild script is a task to delete a folder


However I\'d rather delete the co

2条回答
  •  孤独总比滥情好
    2021-01-17 11:15

    This will remove all files and subfolders:

        
    
        
          c:\clean
        
    
        
          
          
        
    
        
        
      
    

    It would also be good to drop open connections using the openfiles tool:

    openfiles /disconnect /ID *
    

提交回复
热议问题