# auto retrieval of year from freedB

**URL:** https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023
**Category:** Support
**Created:** [October 29, 2010, 12:28am UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023 "2010-10-29T00:28:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![susiwong](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e495f1/32.png) [@susiwong](https://community.mp3tag.de/u/susiwong)
#### Post date: [October 29, 2010, 12:28am UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/1 "2010-10-29T00:28:18Z")

</div>

Ok, here's my 2nd question.  
Many of my old ripped CD folders lack the year, unfortunately.  
Is there a way to auto-fill in the year in all files without changing the rest, by calling up an action or something ?  
Thanks for any help,  
susiwong

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 29, 2010, 11:19am UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/2 "2010-10-29T11:19:20Z")

</div>

you can take one of the many existing web sources scripts in the forum and edit it to write only the year.  
open it with a text editor.

1. EASY WAY:

write at the end of the script:  
set "artist"  
set "album"  
set "tracks"  
...  
for every tag you want to keep untouched. important: use "tracks" instead of "track" & "title".

1. MORE COMPLICATED WAY (but maybe the script runs faster)  
delete everything in the script which is does not belong to the year tag.  
keep only:  
the index part of the script which finds the album in the web.  
the necessary parts to find & write the year.

---

<div class="post-metadata">

### Author: ![susiwong](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e495f1/32.png) [@susiwong](https://community.mp3tag.de/u/susiwong)
#### Post date: [October 29, 2010, 12:57pm UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/3 "2010-10-29T12:57:03Z")

</div>

Thanks, sounds promising.  
I've been using web sources before, without getting the modular concept.

Unfortunately I'm not experienced enough to correctly edit the src myself.  
Care to help ?

> [@](#):
>
> # 
> 
> # Mp3tag (v2.36+) parsing for [freedb2.org](http://freedb2.org)
> 
> # 
> 
> # Search by ALBUM
> 
> # This file should be in your sources directory
> 
> # On Windows XP it's
> 
> # C:\Documents and Settings\*username\*\Application Data\Mp3tag\data\sources
> 
> # 
> 
> # Modifications:
> 
> # 2006-07-08: started
> 
> # 
> 
> # 
> 
> [Name]=freedb2  
> [BasedOn]=[freedb2.org](http://freedb2.org)  
> [IndexUrl]=[http://freedb2.org/~cddb/cddb.cgi?cmd=cddb+album+/+%s&hello=User+Mp3tag.de+Mp3tag&proto=6](http://freedb2.org/~cddb/cddb.cgi?cmd=cddb+album+/+%25s&hello=User+Mp3tag.de+Mp3tag&proto=6)  
> [AlbumUrl]=[http://freedb2.org/freedb/](http://freedb2.org/freedb/)  
> [WordSeperator]=+  
> [IndexFormat]=%Category%|%\_url%|%Artist%|%Album%  
> [SearchBy]=%album%  
> [Encoding]=utf-8
> 
> [ParserScriptIndex]=...
> 
> # 
> 
> # I N D E X
> 
> # 
> 
> # Uncomment the following line if you want to write some debug output
> 
> #debug "on" "c:\\debug\_freedb2\_A.html" "10"
> 
> moveline 1  
> do   
> findline " "  
> # Category  
> sayuntil " "  
> say "|"  
> findline " "
> 
> ```
> # Category + DiscID
> sayuntil " "
> say "/"
> movechar 1
> sayuntil " "
> say "|"
> movechar 1
> 
> # Artist
> sayuntil " / "
> say "|"
> movechar 3
> 
> # Album
> sayrest
> 
> saynewline
> moveline 1 1
> findinline " " 1 1
> movechar -1
> 
> ```
> 
> while " " 300
> 
> [ParserScriptAlbum]=...
> 
> # 
> 
> # A L B U M
> 
> # 
> 
> # Uncomment the following line if you want to write some debug output
> 
> #debug "on" "c:\\debug\_freedb2\_B.html" "10"
> 
> # Artist
> 
> findline "DTITLE="  
> findinline "DTITLE="  
> outputto "Artist"  
> sayuntil " / "
> 
> # Album
> 
> movechar 3  
> outputto "Album"  
> sayrest
> 
> # Year
> 
> findline "DYEAR="  
> findinline "DYEAR="  
> outputto "Year"  
> sayrest
> 
> # Genre
> 
> findline "DGENRE="  
> findinline "DGENRE="  
> outputto "Genre"  
> sayrest
> 
> # Tracks
> 
> outputto "tracks"  
> findline "TTITLE"  
> do  
> findinline "="  
> sayrest  
> say "|"  
> moveline 1  
> while "TTITLE"

from the freedb2\_b.src found here in the forum

Cheers,  
susiwong

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 29, 2010, 1:07pm UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/4 "2010-10-29T13:07:48Z")

</div>

> [@susiwong](#):
>
> Thanks, sounds promising.  
> I've been using web sources before, without getting the modular concept.
> 
> Unfortunately I'm not experienced enough to correctly edit the src myself.  
> Care to help ?
> 
> from the freedb2\_b.src found here in the forum
> 
> Cheers,  
> susiwong

keep everything above "[ParserScriptAlbum]=..."  
replace everything from "[ParserScriptAlbum]=..." to the end with the following code:

```
[ParserScriptAlbum]=...
# ###################################################################
# A L B U M
# ###################################################################
# Uncomment the following line if you want to write some debug output
#debug "on" "c:\\\\debug_freedb2_B.html" "10"

# Year
findline "DYEAR="
findinline "DYEAR="
outputto "Year"
sayrest

```

save the .src file under a new name, e.g. freedb2\_b\_YEAR\_ONLY.src to keep the old file if needed.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 29, 2010, 1:09pm UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/5 "2010-10-29T13:09:57Z")

</div>



---

<div class="post-metadata">

### Author: ![susiwong](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e495f1/32.png) [@susiwong](https://community.mp3tag.de/u/susiwong)
#### Post date: [October 29, 2010, 2:00pm UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/6 "2010-10-29T14:00:53Z")

</div>

Thanks again, the script works !

In case anybody's interested :

> [@](#):
>
> # 
> 
> # Mp3tag (v2.36+) parsing for [freedb2.org](http://freedb2.org)
> 
> # 
> 
> # Search by ALBUM
> 
> # This file should be in your sources directory
> 
> # On Windows XP it's
> 
> # C:\Documents and Settings\*username\*\Application Data\Mp3tag\data\sources
> 
> # 
> 
> # Modifications:
> 
> # 2006-07-08: started
> 
> # 
> 
> # 
> 
> [Name]=freedb2  
> [BasedOn]=[freedb2.org](http://freedb2.org)  
> [IndexUrl]=[http://freedb2.org/~cddb/cddb.cgi?cmd=cddb+album+/+%s&hello=User+Mp3tag.de+Mp3tag&proto=6](http://freedb2.org/~cddb/cddb.cgi?cmd=cddb+album+/+%25s&hello=User+Mp3tag.de+Mp3tag&proto=6)  
> [AlbumUrl]=[http://freedb2.org/freedb/](http://freedb2.org/freedb/)  
> [WordSeperator]=+  
> [IndexFormat]=%Category%|%\_url%|%Artist%|%Album%  
> [SearchBy]=%album%  
> [Encoding]=utf-8
> 
> [ParserScriptIndex]=...
> 
> # 
> 
> # I N D E X
> 
> # 
> 
> # Uncomment the following line if you want to write some debug output
> 
> #debug "on" "c:\\debug\_freedb2\_A.html" "10"
> 
> moveline 1  
> do   
> findline " "  
> # Category  
> sayuntil " "  
> say "|"  
> findline " "
> 
> ```
> # Category + DiscID
> sayuntil " "
> say "/"
> movechar 1
> sayuntil " "
> say "|"
> movechar 1
> 
> # Artist
> sayuntil " / "
> say "|"
> movechar 3
> 
> # Album
> sayrest
> 
> saynewline
> moveline 1 1
> findinline " " 1 1
> movechar -1
> 
> ```
> 
> while " " 300
> 
> [ParserScriptAlbum]=...
> 
> # 
> 
> # A L B U M
> 
> # 
> 
> # Uncomment the following line if you want to write some debug output
> 
> #debug "on" "c:\\debug\_freedb2\_B.html" "10"
> 
> # Year
> 
> findline "DYEAR="  
> findinline "DYEAR="  
> outputto "Year"  
> sayrest

Really appreciate your help,  
cheers,  
susiwong

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:22pm UTC](https://community.mp3tag.de/t/auto-retrieval-of-year-from-freedb/11023/7 "2026-02-09T12:22:39Z")

</div>


