I have two files say Report.csv Reference.csv
I want to write a Script will reference the Report-ID in the report file names and cross-reference with Reference file data to determine the folder location to move the report.
For eg: Name of Report.csv - R00001.csv
Data in Reference.csv as below:
R-00001 BB Trust
R-00002 AA Trust
R-00003 ZZ Trust
R-00004 Canada Inc.
Here in the above, we could see that file name of Report.csv & the first cell value in the Reference.csv is same.
After lookup, the R00001.csv file needs to be moved to BB Trust folder
Likewise, for each of the Report file, same procedure needs to be followed
Please have a look over on the below BATCH script and correct the bugs.