I am downloading files from 2 different database and it is having same file format. I want to rename this files and transfer it to 2 different folders but I am unable to get it in the particular folder. For e.g If I download 2 files from a database A and 1 file from database B then I want to transfer this files in different folder but the issue is that database A has 2 files so I am able to rename one file and transfer it in the particular folder but the 2nd file from database A is getting renamed different i.e getting renamed with the folder name of database B. and getting transferred to database B folder instead of Database A folder.