I need .bat that will make folders based on filenames and put files inside. I have names formatted like this:
string1 - string2 - string3 - string2 - string3_number.jpg
I find out command that will take 3 first strings as i needed, but cant make it work further. When i try to put this command into bat it makes only folder called "--".
for /F "tokens=1,2,3 delims=-" %%a in ('dir /B /A-D') do (set string1=%%a&set string2=%%b&set string3=%%c md "%string1%-%string2%-%string3%")
putting @echo off and setlocal before this in .bat dont work can someone help make it right so it will make folders based on names and put files in. I read these posts but still can't even make folders: