SARKARIRESULTUP.COM

Home New Blog Technology Food & Recipe Travel Test Education

How to change all page extension on one click

Written by Kamlesh, Created on March 27, 2020
Technology, Trick

If you have a large project or folder with the file and want to change the file extension of all the pages at once. You can use the following command.

Change all file extension using command Line


  1. Open terminal or cmd. Go into the folder that you have created and run command- for example, the folder name is myfolder.

  2. cd myfolder

  3. Now run the following command to change page with .php extension into .html extension. This command changes all the page extension in the folder named "myfolder".

  4. ren *.php *.html

    Note- The above command will not change the extension inside the subfolder.

  5. To change the extension of the page inside the subfolder. Run the command- It will change page with .php extension into .html extension.

  6. FOR /R %f IN (*.php) DO REN "%f" *.html

Like on facebook
See on Youtube