Rename File under WWWroot in kudu

Mohammed Elmostafa Moawia 0 Reputation points
2023-02-23T10:03:55.5033333+00:00

how to rename a file under wwwroot in kudu using commands.

I have a file .ico i need to rename it after deployment from kudu UI using commands

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,990 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 25,111 Reputation points Microsoft Employee Moderator
    2023-02-23T12:31:14.8666667+00:00

    @Mohammed Elmostafa Moawia Thank you for reaching out to Microsoft Q&A.

    If you webapp is running on the windows app service plan then in your kudu console you will get two Debug Console's

    1. CMD --> If you want to rename the file using CMD then you can use the cmdlet ren <CurrentFileName> <NewFileName>
    2. Power Shell --> you need to use the cmdlet Rename-item <CurrentFileName> <NewFileName>

    If you webapp is running on Linux app service plan, then in your kudu you will have bash console. In bash if you want to rename a file you can make use of cmdlet mv <currentFileName> <NewFileName>

    Feel free to reach back to me if you have any further questions on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.