# Read filename and folder

**URL:** <https://forum.cadmunity.com/t/read-filename-and-folder/2917>\
**Category:** Macro Library\
**Created:** [February 22, 2024, 4:15pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917 "2024-02-22T16:15:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sloworks](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sloworks/32/5197_2.png) [@sloworks](https://forum.cadmunity.com/u/sloworks)\
**Post date:** [February 22, 2024, 4:15pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/1 "2024-02-22T16:15:26Z")

</div>

Hi, small addition to my macros/add-ins

This one reads active documents folder, filename and both and you can copy them to clipboard. I use it often for example with “save as to not native format” or when I have to email the full path to someone. GetDamnPathAndName.swp

All my SW-stuff and link to downloads:  
[https://sloworks.fi/muut/](https://sloworks.fi/muut/)  
 ![pois1.png](https://forum.cadmunity.com/uploads/default/original/2X/c/cf9caa470885ba254941b2c239f7162200f74237.png)

---

<div class="post-metadata">

**Author:** ![gupta9665](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/gupta9665/32/6304_2.png) [@gupta9665](https://forum.cadmunity.com/u/gupta9665)\
**Post date:** [February 22, 2024, 7:06pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/2 "2024-02-22T19:06:37Z")

</div>

Thank you for sharing.

---

<div class="post-metadata">

**Author:** ![Fabrizio\_T](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/fabrizio_t/32/149_2.png) [@Fabrizio\_T](https://forum.cadmunity.com/u/Fabrizio_T)\
**Post date:** [November 22, 2024, 12:54pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/3 "2024-11-22T12:54:02Z")

</div>

Dear Sloworks,

I hope this message finds you well.  
I wanted to take a moment to express my gratitude for the wonderful macro you shared.  
It truly inspired me!  
I’ve made a few slight modifications to tailor it to my needs, allowing me to copy the same data from the selected component. As a mechanical designer and not a programmer, I acknowledge that the code I’ve produced might not be particularly polished, but I’m pleased to say that it works!

Thank you once again for your valuable contribution. Your work has made a significant impact on my project.

Best regards,  
Fabrizio

---

<div class="post-metadata">

**Author:** ![sloworks](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sloworks/32/5197_2.png) [@sloworks](https://forum.cadmunity.com/u/sloworks)\
**Post date:** [November 25, 2024, 3:04pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/4 "2024-11-25T15:04:39Z")

</div>

Hi, nice version. Did not understand probably all of it because the language thought 🙂

It’s quite annoying that SW does not give any really good way to get those names and paths…and when you get annoyed, you go and automate the damn thing so you never have to worry again 🙂

---

<div class="post-metadata">

**Author:** ![AlexLachance](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/alexlachance/32/25_2.png) [@AlexLachance](https://forum.cadmunity.com/u/AlexLachance)\
**Post date:** [November 25, 2024, 3:20pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/5 "2024-11-25T15:20:12Z")

</div>

“Get Damn Path and Name” as a macro name made me chuckle 😆

---

<div class="post-metadata">

**Author:** ![sloworks](https://forum.cadmunity.com/user_avatar/forum.cadmunity.com/sloworks/32/5197_2.png) [@sloworks](https://forum.cadmunity.com/u/sloworks)\
**Post date:** [December 22, 2024, 2:26pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/6 "2024-12-22T14:26:57Z")

</div>

Faster version. Closes after you press one of the 4 buttons.

---

<div class="post-metadata">

**Author:** ![DLZ\_SWX\_User](https://forum.cadmunity.com/letter_avatar_proxy/v4/letter/d/e36b37/32.png) [@DLZ\_SWX\_User](https://forum.cadmunity.com/u/DLZ_SWX_User)\
**Post date:** [January 2, 2025, 5:18pm UTC](https://forum.cadmunity.com/t/read-filename-and-folder/2917/7 "2025-01-02T17:18:52Z")

</div>

Sweet!
