I'm looking for a batch file to accomplish the following tasks:
Batch file to Look at the folder and sub folders of a location (for example: \server1\main\ and its sub folders) and copy the files based on the first 3 letter of the files' names to multiple folders corresponding to their names.
After the copy is finished I would like to move the original files/folder to an archive directory.
The file format is as follows: AAA_xxx_xxx.jpg
- the first 3 letters of the file name is what we care about.
Example:
- Files
\\server1\main\AAA\AAA_xxx_xxx.jpg
will get copied to\\server2\files\AAA\
- Files
\\server1\main\BBB\BBB_xxx_xxx.jpg
will get copied to\\server2\files\BBB\