# How can I run multiple rake posts:remap at once?

**URL:** <https://meta.discourse.org/t/how-can-i-run-multiple-rake-posts-remap-at-once/264920>\
**Category:** Self-hosting\
**Created:** [May 13, 2023, 10:34pm UTC](https://meta.discourse.org/t/how-can-i-run-multiple-rake-posts-remap-at-once/264920 "2023-05-13T22:34:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![hiccup](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hiccup/32/141306_2.png) [@hiccup](https://meta.discourse.org/u/hiccup)\
**Post date:** [May 13, 2023, 10:34pm UTC](https://meta.discourse.org/t/how-can-i-run-multiple-rake-posts-remap-at-once/264920/1 "2023-05-13T22:34:34Z")

</div>

Hey  
I have two questions if you can help I will be grateful for that

1: I have multiple rake posts:remap more than 1000

Example:

```plaintext
rake posts:remap["https://demo.com/?p=100041115","https://www.discourse.com/t/14529"]
rake posts:remap["https://demo.com/?p=100041158","https://www.discourse.com/t/14530"]
rake posts:remap["https://demo.com/?p=100041181","https://www.discourse.com/t/14531"]
rake posts:remap["https://demo.com/?p=100041222","https://www.discourse.com/t/14532"]
rake posts:remap["https://demo.com/?p=100041280","https://www.discourse.com/t/14533"]
rake posts:remap["https://demo.com/?p=100041321","https://www.discourse.com/t/14534"]
rake posts:remap["https://demo.com/?p=100041556","https://www.discourse.com/t/14535"]
rake posts:remap["https://demo.com/?p=100041629","https://www.discourse.com/t/14536"]
rake posts:remap["https://demo.com/?p=100041642","https://www.discourse.com/t/14537"]
rake posts:remap["https://demo.com/?p=100041745","https://www.discourse.com/t/14538"]

```

**How can I run all of them at once?**

**2: how can I use Regex Remap?**

to remove the text in all URLs that have text at the end like this one

`https://demo.com/?p=100041115/text-text`

To be like this

`https://demo.com/?p=100041115`

just remove the text at the end of this URLS

Thank you.

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-run-multiple-rake-posts-remap-at-once/264920)._
