New
#1
Move files from original folder to existing folders - w batch file?
My files have a format of "ID_date_time.d7d”
Ex: 11111-5_2013_10_07_142149.d7d
The ID is 1111-5 and was tested 10/7/2013 at 2:21:49 PM and the file extension is always .d7d
The local files are automatically saved here by the program generating the data:
C:\Local\Data
I want them copied to the following directory:
E:\common\UserGroup\UserLocation\Test Data\(ID)
For the above example, it would be copied to: E:\common\UserGroup\UserLocation\Test Data\11111-5
Then, upon successful completion of copying the file, I want the file moved to:
C:\IDArchive\Data\Old Data
Then the file should be removed from the original Local folder.
I can do most of this with a batch file, up to the point where I match the file in the Local\Data folder to its proper destination using its ID number. I need to pull the ID number out of the file name and use it to identify its destination - all of the destination folders already exist. I can't figure out the correct code in the batch file to find the ID number and then extract and match it to its folder.
Help?