batch add: simplified the code removing useless variables

Based on FR commit: 2436a7e8fc36d4c020b566d1947b1571d5a49da2
From: Paolo Bacchilega <paobac@src.gnome.org>
Remove unused variable