FixupRedirects and Content Browser

Hi!

Could you please help me to cope with following issues?

  • When I’ve deleted folder in “Content Browser” and pressed “save” this folder didn’t delete in file system. And if I’ll restart editor the “folder” will be present in “Content Browser”. How can I delete permanently folder in Content Browser?

  • When I use FixupRedirects in “Content Browser” it’s works well! But, when I’m trying to use the following commandlet. it doesn’t do anything. ~1Kb files (redirectors) didn’t delete.

UE4Editor.exe “Myproject\MyProject.uproject” -run=FixupRedirects -testonly
I guess I’m doing something wrong but I can’t figure out what it is!

My goal do this on a nightly basis to ensure the FixupRedirects is always done. How can I do it?

Looking forward for your reply!

Best regards,
Konstantin

Hi Konstanin,

Fixing Redirectors works best if your using UE4 with Perforce / SVN as version control. Git is still in beta and there are few edge cases where redirectors will be left out and won’t be fixed.

So ensure that your source control within UE4 Editor is setup. That way when redirectors are made and when you execute fixup on top level directory they will be cleaned.

Something else you can do is add a batch script “RemoveEmptyDirectories.bat” on the top level directory and run it when appropriate so that empty directories are removed and won’t show up in the editor.

@echo ================REMOVING EMPTY DIRECTORIES=============
for /f "delims=" %%d in ('dir /s /b /ad ^| sort /r') do rd "%%d"
@echo off

Regards,
Abhi

Konstantin,

Can you try removing the -testonly flag from your command to see if that works?
Looking at the UFixupRedirectsCommandlet, that flag will cause the command to only output information to the log file and terminate early (not actually fixing the redirectors).

My guess is that once that’s gone, what you’re doing should probably work. However, feel free to reach out if you have any more questions.

Thanks,
Jon N.