readdir does NOT return the complete path, so 'ACCTGG.fg' is not the same file as 'samplesA/ACCTGG.fg' .
In reply to Re: change files names bug by RichardK in thread change files names bug by Yuma248