Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (45.3k points)

How can I rename a file in a release definition in Visual Studio Team services? Is there a built-in or marketplace task available or otherwise, how can this be achieved?

1 Answer

0 votes
by (16.8k points)
  • Add the "Inline PowerShell" task from the marketplace
  • Enter the following PowerShell code in the text area

Param

(

 [string]$pathToFileToRename

)

Rename-Item $pathToFileToRename NewName.txt

  • Enter any required arguments in the arguments text box (you can use environment variables), for example.

pathToFileToRename $(System.DefaultWorkingDirectory)/somepath/CurrentName.txt

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...