Affymetrix supplies this information (Affymetrix IDs to rs ids) on their website. First find the Affymetrix chip that was used to create the dataset, then look it up on www.affymetrix.com. Go to the "Technical Documentation" tab and then scroll down till you find the annotation files (for example, for this chip, you go to the "Current NetAffx Annotation Files" area). Download the CSV with all the annotations. The first column is the Affymetrix ID, the second column is the corresponding rs ID. You can write a script to convert these en masse.