# Add metadata from filename

**URL:** https://resource.dopus.com/t/add-metadata-from-filename/10937
**Category:** Help & Support
**Created:** [May 17, 2011, 10:58am UTC](https://resource.dopus.com/t/add-metadata-from-filename/10937 "2011-05-17T10:58:43Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![AlbatorV](https://resource.dopus.com/user_avatar/resource.dopus.com/albatorv/32/25847_2.png) [@AlbatorV](https://resource.dopus.com/u/AlbatorV)
#### Post date: [June 7, 2011, 2:18pm UTC](https://resource.dopus.com/t/add-metadata-from-filename/10937/12 "2011-06-07T14:18:30Z")

</div>

ok, it's work now. thanks again...

```nohighlight
@nodeselect
Rename FILEINFO TO="{mp3track}%{mp3title}"
@script vbscript
Option Explicit
Dim DOpusRTPath
DOpusRTPath = "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Function Rename_GetNewName ( strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName )
    Dim re, strCommand, track, titre, path
    Set re = new RegExp
    re.Pattern = "^([0-9]*) - (.*)(\.mp3)"
    track = re.Replace(strFileName, "$1")
    titre = re.Replace(strFileName, "$2")
    path = strFilePath & "\" & strFileName
    strCommand = """" & DOpusRTPath & """ /cmd SetAttr """ & path & """ META ""track:" & track & """ ""title:" & titre & """"
    Shell.Run strCommand,0,false
    Dopus.OutputString "Commande : " & strCommand
    strNewName = ""
End Function

```

---

_[View the full topic](https://resource.dopus.com/t/add-metadata-from-filename/10937)._
