# Equivalent Scripting API to "Fix up Redirectors in Folder"?

**URL:** <https://forums.unrealengine.com/t/equivalent-scripting-api-to-fix-up-redirectors-in-folder/447638>\
**Category:** Editor Scripting\
**Tags:** Python, moving-object, unreal-engine, Scripting, question\
**Created:** [April 22, 2019, 1:22pm UTC](https://forums.unrealengine.com/t/equivalent-scripting-api-to-fix-up-redirectors-in-folder/447638 "2019-04-22T13:22:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kakyoism](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kakyoism](https://forums.unrealengine.com/u/kakyoism)\
**Post date:** [April 22, 2019, 1:22pm UTC](https://forums.unrealengine.com/t/equivalent-scripting-api-to-fix-up-redirectors-in-folder/447638/1 "2019-04-22T13:22:12Z")

</div>

Moving and renaming assets in Content Browser must be followed by a Fix up Redirectors in Folder op when done by hand. Is there an equivalent Python API?

According to the doc:

> **[Redirectors](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/Redirectors/)**
>
> Objects that are placed in packages to redirect references to moved assets to their current locations.

I should scan the ENTIRE project to fix up the PROJECT-wise redirectors whenever a renaming/moving happens. This is next to impossible considering how big the project could become. Can’t we fix the redirectors in a specified folder by scripting?

Since there is a Fix up Redirectors in Folder menu item there, isn’t there an API for this as well?

---

<div class="post-metadata">

**Author:** ![aleksei.kanash](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aleksei.kanash](https://forums.unrealengine.com/u/aleksei.kanash)\
**Post date:** [March 20, 2021, 5:56pm UTC](https://forums.unrealengine.com/t/equivalent-scripting-api-to-fix-up-redirectors-in-folder/447638/2 "2021-03-20T17:56:52Z")

</div>

Good day everyone.  
I think everybody knows what is [Redirectors](https://docs.unrealengine.com/en-US/ProductionPipelines/Redirectors/index.html)?

So, they appear often when you are moving or renaming your assets.  
And there is a lot of issues when you want to fix them up.

This is the guide - how doing it faster.  
Basically to see redirectors you have to enable “Filters-\>Others-\>Show Redirectors” in your content browser.  
You can just right click on a redirector and select “Fix up” in the menu.  
But also there is an option like “fix up redirectors in Folder” - it DOES NOT work.  
Also, you can select multiple assets and press the Fix up button - it will do some work and will hide all redirectors, but will not fix them up. When you will restart Editor they will return back. Also

So today I spent about 3 hours fixing them 1 by 1.  
When i became tired, i decided to create a script.

In windows everything is documented in the link above.  
But i am working on mac os.

So the solution is:

1. Create a bash script like fix\_redirectors.sh

> #!/bin/bash  
> open “/Users/Shared/Epic Games/UE\_4.25/Engine/Binaries/Mac/UE4Editor.app” --args /FullPath/To/YourProject/ProjectName.uproject -run=ResavePackages -fixupredirects -autocheckout -projectonly -unattended

1. Then do chmod +x fix\_redirectors.sh
2. Execute the script

I have to mention that it did not work in other way for me. I tried to use relative path to the project - console was just closed.

Thanks!
