To remove some tags from the files but still have the values available to use in the file naming script, you may first need to save them to temporary variables in a tagging script such as:
$noop( Create temporary variables )
$set(_temp_albumartist,%albumartist%)
$set(_temp_discnumber,%discnumber%)
$set(_temp_totaldiscs,%totaldiscs%)
$set(_temp_compilation,%compilation%)
$noop( Remove unwanted tags )