Can't duplicate Asset due to 'LongPackageName'??

Hi Everyone!

I’m trying to duplicate an existing material and save it in a specified path in my project using a blueprint (as I’m building an editor tool). I’m using the ‘Get Asset Tools’ and then “Duplicate Asset” but I’m getting the following error:

‘C:/Users/myname/Documents/Unreal Projects/TESTING/MyProject/Content/SpecificFolder/NewMat’ does not start with a ‘/’, which is required for LongPackageNames.

I don’t get this error if I use the ‘Duplicate Asset with Dialogue and Title’ but it doesn’t open the dialogue at my file location (it just opens at the main Content directory). I also want to automatically save the material at a set location not ask the user to choose.

Anyone know a workaround for this?

Thanks very much!

^^ Bumping this. Anyone have any advice here?? Feels like this must have come up before for others. Huge thanks!

Anyone?!?! Surely this must have come up before?

Hmm have a look and see if this helps: Unable to generate long package name - #2 by anonymous_user_fe1d1252

Thanks for the response @EliasWick. Sadly, deleting the Saved and Intermediate folders don’t solve this.

It seems like it’s saying the path should start with a “/” but I’ve tried putting that at the beginning of the filepath but that causes an error complaining of an invalid character.

Seems crazy to me that this is an issue but I’m completely lost on how to solve it.

For now, I’ve just simplified what I’m doing and use /Game/MyFolder/MySubfolder. This works for what I need I think.