|There would be main folder with some name "Main". In this folder we will have n number of files with different names.|
The sample filenames would be as follows:
1. BIFLL4_WEST BENGAL-700001_932795867__Merged
2. BIFLL3_WEST BENGAL-700001_932795867__Merged
3. BIFNP1_WEST BENGAL-700001_932795867__Merged
4. BIFNP4_WEST BENGAL-700001_932795867_270510 _Merged
As you can see in the above filenames "932795867" is same and assume that as account no. There will be number of files with same account number. And there will be no of accounts of same kind.
Now I need to sort out these duplicates and keep them into different folders by creating "Main_1", "Main_2", "Main_3" ..... In this folders I need to keep the files where in a particular directoy no same account files should exists. In the "Main" directory we need to contain all the uniques files what we have at the starting.
Please help me how to solve this in batch processing. I have tried but I'm stuck at how to take the account number from the filename and process it.