Let's say I have a client folder path as follows:
F:\Clients\A\ABBIWJ-Abbolt, John T\
F:\Clients\A\ABS650 - ABS 6500, Inc\
F:\Clients\A\ACKLJB-Ackenlin, Josh B\
F:\Clients\A\ACMSCA - ACMS Corp\
F:\Clients\A\ALLEBM - Allen, Brook M\
The above displays a very small sample of the "A" folder client files. Each letter (Clients\A\ - Clients\Z\) could have hundreds of clients folders. The folder names begin with a six character client code followed for a "-" or spaces before and after the hyphen, and then the clients name (individual or business name). The uniqueness is derived by the first six characters for the client folder name. Within each client folder there will exist varying subfolders and files.
I am looking at about 10,000 client folders in total, and moving about seventy-five percent of the client folders to an archive location leaving the active client folders intact.
I would like to create an exclusion file with only the six character client code (ABBIWJ,ABS650,ACKLJB...), so that an xxcopy command will move the other folders (in this case: ACMSCA,AERRES,ALLEBM). The command should move these client folders along with all of its subfolders and files.
The destination will be a NAS server, such as \\NAS01\Clients\A\
Question: How can I have xxcopy look at the first six characters of the root client (Clients\A\ - Clients\Z\) folder name, compare the six characters with the list defined in the exclusion list, and if it does not exist in the list to move the folder/subfolders/files to the NAS storage device maintaining the same folder structure.
I have not thought about the situations where a folder needs to be moved to the NAS storage device and the same client code folder name exists there as well, and should it simply replace it or add 1 after the destination name or simply merge it or something. That will be the next issue after figuring out the above first. Feedback is definitely appreciated.