# Scripts - Get selected event path name

**URL:** <https://qa.fmod.com/t/scripts-get-selected-event-path-name/14404>\
**Category:** FMOD Studio\
**Created:** [March 1, 2019, 4:24am UTC](https://qa.fmod.com/t/scripts-get-selected-event-path-name/14404 "2019-03-01T04:24:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BBI-JonWiedemann](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@BBI-JonWiedemann](https://qa.fmod.com/u/BBI-JonWiedemann)\
**Post date:** [March 1, 2019, 4:24am UTC](https://qa.fmod.com/t/scripts-get-selected-event-path-name/14404/1 "2019-03-01T04:24:38Z")

</div>

Hello, I’m trying to use an FMOD Studio script to generate a list of the path names for selected events.

I’m currently using this, but it only returns the event name not the full “event:/foldername/eventname”  
function findEventsRecursively(items, filter)  
{  
var result = [];  
items.forEach(function(item) {  
if(item.isOfType(“Event”)) {  
result.push(item);  
}  
if(item.isOfType(“Folder”)) {  
result = result.concat(findEventsRecursively(item.items));  
}  
});  
return result;  
}

```
        var allEvents = studio.window.browserSelection();           
        allEvents = findEventsRecursively(allEvents);
        allEvents.forEach(function(item) 
        {
            if( item.isOfType("WorkspaceItem") )
            {   
                console.log(item.name);                    
            }                
        });
```

---

<div class="post-metadata">

**Author:** ![BBI-JonWiedemann](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@BBI-JonWiedemann](https://qa.fmod.com/u/BBI-JonWiedemann)\
**Post date:** [March 1, 2019, 4:25am UTC](https://qa.fmod.com/t/scripts-get-selected-event-path-name/14404/2 "2019-03-01T04:25:54Z")

</div>

Also, is there any documentation for what we can call from (item) ? Other than just item.name.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [March 13, 2019, 1:23am UTC](https://qa.fmod.com/t/scripts-get-selected-event-path-name/14404/3 "2019-03-13T01:23:53Z")

</div>

If you are using FMOD Studio 1.10 then you can use `studio.project.model.Event.findInstances()` to find all events in your project.

Also, the “name” of the item would just return the actual name of the event and not its path. Again, in FMOD Studio 1.10 you can use `item.getPath()` to get it’s path. Otherwise you would need to edit the `findEventsRecursively()` function to grab the `item.folder` and check if it’s the master folder otherwise grab that folders name to recursively create a path yourself.

You can call `item.dump()` to get a list of all valid properties and helper functions on that item.
