Kelemvor
Lifer
So I have a bunch of files in one folder. I want to move each file into a folder that matches the name of the file. I can do this through DOS but am having trouble when the filename has a space in it.
E.g. c:\this is the file.txt -> c:\this is the file\this is the file.txt
Can anyone help me out with this?
Here's the DOS command that works as long as there aren't any spaces...
for /f %f in ('dir *.txt /b') do md %~nf & move %f .\%~nf\
Thanks.
E.g. c:\this is the file.txt -> c:\this is the file\this is the file.txt
Can anyone help me out with this?
Here's the DOS command that works as long as there aren't any spaces...
for /f %f in ('dir *.txt /b') do md %~nf & move %f .\%~nf\
Thanks.