How can I get #, tracklist property from file?

Ive tried using Get FIle Info activity and new System.IO.FileInfo(CurrentFile.ToString) but no luck.

How can i get the # tracklist number property for a file?
I’m able to get Date Modified but need the tracklist number.

FileInfo does not offer those properties as e.g. Track number is one property of the extended (or also called advanced) properties

We would recommend to check:

  • can the use case be scoped to MP3 only
  • exploring offered packages / libraries specialized for it

Use this library:

Pseudo Code:

  1. Install the “TagLibSharp” package: TagLibSharp is a popular library for working with metadata in audio files. You can install it via the NuGet package manager in UiPath Studio. Right-click on your project in the “Project” panel, select “Manage Packages,” search for “TagLibSharp,” and click on the “Install” button.
  2. Import the necessary namespaces: In your workflow, add an “Import” statement at the top of your file to import the required namespaces:

vbnetCopy code

Imports TagLib
  1. Use the TagLib library to read the tracklist number: Once you have the file path, you can use the TagLib library to read the tracklist number property. Here’s an example of how you can do it:


Dim filePath As String = "path_to_your_file"
Dim file As TagLib.File = TagLib.File.Create(filePath)
Dim trackNumber As String = file.Tag.Track.ToString()

In this code snippet, replace “path_to_your_file” with the actual path to your file. The Tag property of the TagLib.File object provides access to various metadata properties of the audio file. The Track property represents the track number, which you can convert to a string using the ToString() method.After executing these steps, the trackNumber variable will contain the tracklist number for the file.


You could try batch script or a powershell script, those work well with files.
The properties you are looking for are extendable properties of a file, you can use Shell32.dll as well.

Enumerate file properties in PowerShell - Stack Overflow