my question would be, why you still use dir???
Code:

$ = SetOption("WrapAtEOL","On")

$dir = 'C:\Documents and Settings\cameron.wilson\Desktop'
dim $paths

for each $file in DirPlus($dir,"/s /f mp3 avi jpg gif")
$path = left($file.path, instrrev($file.path,"\"))
if -1 = ascan($paths,$path)
redim preserve $paths[ubound($paths)+1]
$paths[ubound($paths)] = $path
? $path
endif
Next

"press any key to quit "
get $

_________________________
!

download KiXnet