convert filename to correct id