# How do I get the folder path of a Blueprint?

**URL:** <https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031>\
**Category:** Blueprint\
**Tags:** folder, actor, unreal-engine, path, question, Blueprint\
**Created:** [March 3, 2015, 11:11pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031 "2015-03-03T23:11:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [March 3, 2015, 11:11pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/1 "2015-03-03T23:11:01Z")

</div>

How do I get the path inside my game folders of a spawned blueprint with c++… the format should be like:  
MyItem’/Game/Items/SomeItem.SomItem’

This inside the blueprints parent class constructor “this-\>GetFolderPath().ToString()” returns “None”…

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [March 4, 2015, 12:35am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/2 "2015-03-04T00:35:13Z")

</div>

Right click asset and click “Copy Reference”, the path will be copied to clipboard

As for dynamicly via C++ this class might be helpful

[https://docs.unrealengine.com/latest/INT/API/Runtime/CoreUObject/Misc/FStringAssetReference/index.html](https://docs.unrealengine.com/latest/INT/API/Runtime/CoreUObject/Misc/FStringAssetReference/index.html)

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [March 4, 2015, 1:15am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/3 "2015-03-04T01:15:14Z")

</div>

Thanks for the answer, shadow!

Yes, I would like to do it dynamicly. But when I try “FStringAssetReference(this).AssetLongPathname”, I only seem to get the path inside the world/map and not inside the folder structure.

![32097-ref.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/2/6/726accf97608e0f7be90fa84b07f13d2e8b3792e.jpeg)

---

<div class="post-metadata">

**Author:** ![do-while-true](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@do-while-true](https://forums.unrealengine.com/u/do-while-true)\
**Post date:** [October 21, 2015, 12:45pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/4 "2015-10-21T12:45:25Z")

</div>

Sorry for posting in this old question but I have the same issue. I was wondering if you could provide the solution if you have one.

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [October 21, 2015, 2:32pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/5 "2015-10-21T14:32:03Z")

</div>

Sorry for late reply, do it on UClass\* of object then

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [October 21, 2015, 6:13pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/6 "2015-10-21T18:13:49Z")

</div>

Didn’t expect an answer for this anymore… but that works great. I wrote the following into the PostInitializeComponents()-Function of my Actor-Class:

```
ObjectPath = "Blueprint'" + this->GetClass()->GetPathName().LeftChop(2) + "'";

```

Basically you could simply write “GetClass()-\>GetPathName()”, but needed the " Blueprint’ ’ " wrapped around it and choped the “\_C” at the end.

Thanks !

---

<div class="post-metadata">

**Author:** ![do-while-true](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@do-while-true](https://forums.unrealengine.com/u/do-while-true)\
**Post date:** [October 22, 2015, 7:10pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/7 "2015-10-22T19:10:53Z")

</div>

Both thank you for the fast responds !

---

<div class="post-metadata">

**Author:** ![SUPER\_OSTERREICH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SUPER\_OSTERREICH](https://forums.unrealengine.com/u/SUPER_OSTERREICH)\
**Post date:** [September 28, 2019, 1:17pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/8 "2019-09-28T13:17:09Z")

</div>

THANK YOU FOR COPY REFERENCE!!!

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [April 17, 2023, 6:45pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/9 "2023-04-17T18:45:32Z")

</div>

> [@Pseudocorpus](#):
>
> GetClass()-\>GetPathName()

does not return the asset path of the blueprint

---

<div class="post-metadata">

**Author:** ![novikovvlal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@novikovvlal](https://forums.unrealengine.com/u/novikovvlal)\
**Post date:** [May 22, 2023, 7:40am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-folder-path-of-a-blueprint/309031/10 "2023-05-22T07:40:07Z")

</div>

LeftChop(2) must be removed to produce correct path
