OK Oracles and others,

There is a script I am using which was developed with help in http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=199647 which I want to improve by fine tuning the destination.

I want to be able to copy to selective destinations. Given that the destination in this script lists all offices, which all have different brands.

Firstly, I want the script running to supply a "brand" as a list arguement, but to validate that arguement against the "brands" listed in the excel spreadsheet. I am guessing to read through the column in Excel with the brands and add the brand to an array if it doesn't exist, then run a match against the array. Is there an easier way?

Secondly, I want to copy the source to the destination only when the "brand" of the next directory in the while/loop is equal to the brand specified when the script is initiated. I am guessing that something like
 Code:
If $Brand = $brandshop[0,2] and $destdirs = $brandshop[0,1]
where $brandshop is the array that ReadExcel2 reads into and $destdirs is the array that is created by doing a DIR on the specified destination would be needed. BUT, would I need to run a mini-loop at that point to run through the ReadExcel2 array as this is just specifying that the element exists in the column doesn't it, or do I understand the UDF incorrectly??

Pax