# Selecting a just the filename from the whole path String

**URL:** https://forum.kirupa.com/t/selecting-a-just-the-filename-from-the-whole-path-string/89455
**Category:** Uncategorized
**Created:** [May 8, 2005, 3:31pm UTC](https://forum.kirupa.com/t/selecting-a-just-the-filename-from-the-whole-path-string/89455 "2005-05-08T15:31:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jammers](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jammers](https://forum.kirupa.com/u/jammers)
#### Post date: [May 8, 2005, 3:31pm UTC](https://forum.kirupa.com/t/selecting-a-just-the-filename-from-the-whole-path-string/89455/1 "2005-05-08T15:31:44Z")

</div>

hi flashers,

wondered if you could help me figure this one out, i have a path to a file in a variable, in the format:

file:///C|/Documents%20and%20Settings/person/My%20Documents/Flash%20Development/JSFL/myfile.as

i want to remove all of the file path information and just grab the filename and file extension. how am i best doing this?

Many thanks in advance chaps and chappettes,

j:+)
