# How can I add a release date of a podcast to the filename or file metadata?

For example, I have downloaded the podcasts for EconTalk and this is the first podcast:

gPodder tells me that this podcast was “Released” on “2006-03-16.”

How do I add this information (yyyy-mm-dd, "2006-03-16") to either the front of the file name or somewhere in the file’s metadata?

My goal is to do the same for all the podcasts I’ve downloaded and not just this particular one.

Currently, this yyyy-mm-dd information doesn’t seem to appear anywhere in the file's metadata:

Looks like gPodder already has a built-in extension which does this. No need to download it as it's included.

1. Click gPodder > Preferences.
2. Click the Extensions tab.
4. Click the Edit config button on the bottom-right of the preferences window.
6. Close remaining windows.

You could also use the following PowerShell to rename existing files:

#
# PrependDateToPodcasts.ps1
#
Param (
[Parameter(Mandatory=$true, Position=0)][string]$FeedURL,
[Parameter(Mandatory=$true, Position=1)][string]$Directory,
[Parameter()][switch]$DryRun =$false
)

$XML = Invoke-WebRequest$FeedURL
$Podcasts = ($XML | Select-Xml "rss/channel/item").Node

$Podcasts | ForEach-Object {$Filename = Split-Path $_.enclosure.url -Leaf$Date = [datetime](($_.pubDate -replace " [A-Z]{3}$", "") -replace "^\w{3}", "") | Get-Date -Format "yyyy-MM-dd"

$FilePath = Join-Path$Directory $Filename$FilenameNew = "${Date} -${Filename}"

if (Test-Path $FilePath) { Write-Host "Renaming "${Filename}" to "${FilenameNew}"." if (!$DryRun) {
Rename-Item $FilePath$FilenameNew
}
}
}

# Preview changes before actually running.