Skip to end of banner
Go to start of banner

How to use findReplace parameter to replace content in all pages in a space

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This article explains about to use findReplace parameter to replace content in all pages in space using the Confluence Command Line Interface app.

Instructions

  1. We can modify content in all pages of a space by using runFromPageList and modifyPage actions.
  2. Run the action command from the terminal/command prompt.
    Command:

    --action runFromPageList --space "DEMO" --common "-a modifyPage --id "@pageId@" --findReplace "oldtext:newtext""

    Output:

    Run: -a modifyPage --id 65538 --findReplace oldtext:newtext
    Page 'page1' in space DEMO modified. Page has id 65538.
    
    Run: -a modifyPage --id 32972 --findReplace ldtext:newtext
    Page 'page2' in space DEMO modified. Page has id 32972.
    
    Run: -a modifyPage --id 131106 --findReplace ldtext:newtext
    Page 'subpage' in space DEMO modified. Page has id 131106.
    
    Run: -a modifyPage --id 98306 --findReplace ldtext:newtext
    Page 'subpage' in space DEMO modified. Page has id 98306.
  3. In the above command "DEMO" is the space key and it will replace all pages in that space with the text "newtext" where ever "oldtext" text is found without mentioning the actual pageId's explicitly.

  • No labels