Hey again guys,
Just a quick request. I've spent a couple hours searching the net for a batch file (or similar) that can create folders based on the file names in a directory and then move those files into the folders, e.g.
- File A
- File B
- Folder A (File A inside)
- Folder B (File B inside)
I want to retain the filenames as the folder names but don't need the extension on the folders. I did stumble across something so close to perfect it hurts but unfortunately, doesn't work if the filenames contain spaces. Anybody here good with batch files?
Closest i've found is the command line:
For %J in (Your_Folder\*.*) Do @(MD %~dpnJ & move %J %~dpnJ)
Works perfect... except if the filenames have spaces :\
Could anyone give us a hand?
If it matters, I'm moving about 300 files - mostly video.