So I have a set of files that look something like this:
Bob - Test Name - 1.txt
Bob - Test Name - 2.txt
Bob - Test Name - 3.txt
Sam- Foo Name - 1.txt
Sam- Foo Name - 2.txt
Sam- Foo Name - 3.txt
Phil - 1.txt
Phil - 2.txt
Phil - 3.txt
Phil 2 - 1.txt
Phil 2 - 2.txt
Phil 2 - 3.txt
Simply, the pattern is something like this:
[WHATEVER] - #.txt
[WHATEVER](space)-(space)(number).extension
I would like to do the following:
- Scan the folder
- Capture WHATEVER. In example above, captures: "Bob - Test Name"
- Create folder called WHATEVER. Here, "Bob - Test Name"
- Moves all files that has WHATEVER string to folder.
- And repeat 2-4 through all files.
So far, everything I have tried, I have failed. Not knowing how to troubleshoot or see what batch is doing, I am shooting in the wind.
I would like this to be extension agnostic as I have various file types (mp3, etc) for this scenario (set extension at the beginning of the batch file).