Moving Assets/Folders

Serious question: How do I move around folders of assets in the editor without f***ing up my whole project?

Every time I move folders, some assets simply stay where they were. So, basically I have to browse all the empty folders for left-over assets. And those folders won’t go away until I delete their counterparts from the windows explorer… When I try to “fix up redirectors” afterwards, they usually just stay, too. Next time I start up the project, I can count on getting errors for broken references or missing files. Sometimes assets actually disappeared completely after I moved them and restarted the project. I mean wth?? Is there a reason these things are happening? I can’t believe something so fundamental could be so utterly broken in UE4.

2 Likes

Same annoyance in 4.14.
Moving blueprints from folder to folder is a big pain in ■■■ and result into bad consequences in further developments !
Slowly i don’t care features anymore ! i need basic features working!

I know this answer comes quite late, but for future issues for other people I hope this can serve as a guide to make things clear and easy when it comes to moving assets and folders. Ive seen so many people having issues with this so I thought it would best to write a proper explanation and solution.

Description

Actually, moving items the correct way in UE4 is quite easy, really. Some fundamental understanding of how programming works makes the issue of moving items a bit easier to comprehend.

Consider that we have a cube (static mesh), with some materials. We have a blueprint that is referencing this cube. Both the cube and the blueprint is placed within a test level.

225808-ref1.png

As I said, the blueprint is referencing the cube. This means that the blueprint has a reference looking/pointing to the cube under a specific folder path (in this case: Content/Test, or as UE4 sees it Game/Test). Somehow the blueprint needs to gather information about the cube, and it does this via referencing the cubes file path.

If we look at the reference viewer for the BP_TestBlueprint we can see that it is infact referencing the cube, and the BP_TestBlueprint is being referenced by the TestLevel since we placed the blueprint in the level(the same goes for the static mesh cube).

So what happens if we now move the cube outside of the Test folder (it is now placed directly under the content folder)? Well the reference will still look at the original place (Content/Test) unless you tell it to do otherwise. What it will do however is that it will add a redirector to the original folder, which in turn points to the new location.

This will ensure that the BP_TestBlueprint can still reference the cube through the redirector. But what happens if we now move the BP_TestBlueprint to a completely different folder and remove the original Test folder? Well, we will delete the redirector for the cube aswell. We will then loose the connection between the blueprint and the cube. Thus, things will break and go wrong. Imagine this being done to an asset that has 20 references, then youre in trouble.

To summarize: The reason why things break when moving assets is because assets have references to eachother. Unreal deals with this by adding redirectors. If the redirector is deleted you loose the connection.

How to correctly move assets and folders

A single asset: can be moved without any problem. It will still work as long as you dont delete the redirector. If you want to delete the original folder (without having to worry about the redirector being deleted aswell), you have to Fix Up Redirectors on the folder itself.

As you can see in the image below, the reference is now pointing to the correct location (directly under the content folder)

A folder: can be moved by first simply moving the folder to a new location. This will still leave the old folder behind with the structure intact. This may seem odd and frustrating. But, this is because all assets referencing things in the original folder is still keeping their references to that folder, Unreal have again added redirectors. Right click the original folder and click Fix Up Redirectories. All assets will now point their references to the new location. You can now delete the original folder without loosing references.

In case youve done all steps correctly and the folder is impossible to delete, this is in 9/10 cases due to a file still inside the structure that Unreal cant recognize. Rightclick the folder and click Show in explorer. Open the folder and see if there are any files left, if you feel safe to delete them, do so and then try to delete the folder from within Unreal again. It should work. Ive noticed that this is more common if youre connected to Source Control and you get a missmatch between versions etc.

The End

I hope this helped and cleared some things up :smiley:

20 Likes

This is a nice and clear explanation of the “theory”. Sadly, the “practice” looks rather different. Try moving a project “main directory” to a sub-directory (Content/X to Content/Y/Z), and you’ll see what I mean…

So you want folder X to me moved to Content/Y/Z/X? This should not be a problem, drag&drop the X folder to the new location, choose “move here”. Then locate the “old” X folder, right click, fix up redirctors. This should work, cant see why not…

Cheers!

1 Like

Thank you. this was very helpful for me.

Also, something I forgot mentioning: There is a filter in the content browser called “Show Redirectors”. This is a super handy filter that will show the redirectors in the content browser. I always leave this on so that you always see if you have assets referencing something via the redirector!

2 Likes

Hello, could so use some help with this, came into this thread after possibly making a bit of a mess deleting directly from explorer. I had installed a plugin (Wwise) that turned out to be incompatible with 4.19.2, no problem disabling that plugin, but this audio tool also involved placing a folder with various tools inside the Content folder of my project, as well as installing the Wwise app. I’ve managed to delete all these files, see nothing related in the Content browser, but when I try to package it fails because, “Could not find a part of the path 'D: \Uralkali_UE4\Uralkali\Content\WwiseAudio.” This folder in explore was uninstalled from the Wwise Launcher BEFORE I learned about the redirectory described here. Since this folder for the Wwise app was deleted in explorer, how do I deal with the path still existing somewhere in this UE4 project? Many thanks.

Hi @BenjvC. I haven’t used UE for a while, but I suspect my “general solution” to this kind of problem might help: just receate some “dummy” content/directory in Windows, and restart UE editor. Now, the editor does have something to delete, so it should be possible to delete the (dummy) content in the “right way”, and make the project consistent again.

Hi skunkiferous, much appreciated. I tried that to no avail, so I installed the Wwise software again, enabled the plugin, now what? I’m not looking to move any folders or assets, I’m simply needing to delete them, I think. What I mean by that, when I try to package w/ or w/o this Wwise plugin I get an error, “…Could not find a part of the path ‘D:\Uralkali_UE4\Uralkali\Content\WwiseAudio’.” This WwiseAudio folder now does exist with all the files inside it in keeping with that path, so what could explain UE4 not finding it? I tried disabling the plugin once again, project now opens without those assets as expected, packaging still throws the same error. I can I zap that ■■■■■■?!

I’ll assume you “Fix Up Redirectors” already. Atm, I can only think of two other things you could try. A) Use a low-level search tool, like “grep -a” to search in all files, including binaries, for the name “WwiseAudio”. Maybe there is some reference to it from some place where you don’t expect … B) Create a new empty project, and try to migrate “all your content” to it, except for that directory. That sounds overkill, but I can’t really think of anything better to try. I’ll have to note that I only used BP until now, so if this is a problem related to C++ code, I wouldn’t know how to solve it.

I would also suggest doing a deep search of all folders, subfolders and files in your project and look for Wwise. Notepad++ should do the trick!

Usually this is a good thing to do if it’s a C++ project, as there are project files, build files and plugin files with all sorts of hard-coded dependencies.

I would also suggest getting rid of the folders: Binaries, Intermediate and Saved just to be sure.

1 Like

Thank you both. I did use “Fix Up Redirectors”, same deal. I went ahead and rebuilt the project, snips of Details for all my lights, volumetric audio triggers, static mesh actors, etc. Total monkey-in-a-box mode for hours, we’ve all been there, but no more WwiseAudio error. School of hard knocks diploma ahead ;^)

Moving a blueprint using a structure, from a folder to another, break the blueprint because the engine is unable to assign structure reference. This an engine problem and has nothing to do with “the correct way to move folders”

try to move 6gb of assets with “move here” … you will change your mind.

2 Likes

Very well explained! Really worked for me!

holy smokes. I’m never attempting to move gigabytes worth of assets in to a sub folder again. I had no idea it would be so computationally expensive. It literally took hours. just for the sake of organization it was not worth it

Sorry that I bring up this old topic again.
First Thank you very much for the detailed explanation.

But as it was mentioned before, moving a whole folder containing a few GBs of stuff takes forever.

By now I’ve spent over 7 hours just waiting for UE to complete its moving operations and I’m still not finished organizing my Project (To give an example: moving the Paragon Grux folder alone took around 2 hours).

It is a fresh project. I had the foresight to not use any asset before moving it, so there should really be nothing that is referencing to them by that time. By the way, the project is stored on an almost new SSD.

And what makes things even worse is that my systen can’t be used for anything else while doing this. It literally freezes for half an hour (with only UE opened) and after it has finished moving the folder the buttons in my Windows explorer are completely messed up (weird scales, most of them missing) and my system remains incredibly slow even after killing UE until I restart.

I don’t get why UE has such issues moving files around. My computer (while certainly not high end) is decent enough to handle high poly sculpting in Blender just fine, let alone simply moving files around.

Edit:
I’ve just moved the remaining assets inside the Windows Explorer and it took (!) Seconds. I’m aware, that may have messed up some references (although I didn’t use any of the assets that have been moved, by now) but I’m seriously considering, that it might be a lot faster to just fix references, if necessary.

I feel your pain but the reason it takes so long is the editor is checking every file for references so they don’t break (unlike explorer that doesn’t care and just relocates the file) while an ssd def improves this speed, its also based on ram I have noticed. more ram you have for it to load and scan the assets the faster it seems to move (tested this on 2 machines, one with 12GB ram and a computer i build from a server board with 256GB of ram) machine with 256GB of ram moved the files 4 times faster

Well, that’s interesting. I swear I read someone from Epic or on their website, that “you don’t need more than 32GB of RAM” … But I got 64GB anyway, because I didn’t trust that statement.