I'm trying to create a batch file that will create a folder based on the first 5 letters of a filename and then move the file into that new folder.
I've tried using this from another post (http://www.computing.net/answers/programming/make-directories-from-file-name-and-move-file/19988.html)
for /f "delims=" %%A in ('dir /a-d /b /tc "*.csv"') do (
copy "%%A" "%%~nA\!file!"> nul
but this creates a unique folder for each file and then copies/moves it there.
Any ideas on how to edit this batch file so that the folders use the first 5 letters of the filename, and this way files with similar names will end up in the same directory ?
Thanks a lot !