Someone over at http://www.dostips.com/forum/viewtopic.php?f=3&t=6138 wrote a batch file that does what I wanted. To use it, simply copy and paste the test from between the two rows of asterisks (but not the rows of asterisks themselves, of course) into a new (empty) text file, rename the text file to something like
BATCHMOVE.BAT
(call it what you like, but the extenstion must be .BAT), alter the line
set number=25
to whatever number of files you want each folder to contain, and copy the .BAT file to the folder that contains the files you want sorted, and run the .BAT file.
*************************************************************************************
@echo off
rem
rem This program creates folders and moves n number of
rem files into each folder.
rem
rem Alter the variable 'number' to your choice.
rem
rem Copyright Yury
setlocal enableextensions
set number=25
for /f "delims=" %%i in ('"2>nul dir/a-d/b"') do (
if not "%%i"=="%~nx0" (
set/a x+=1
for /f %%j in ('"set/a (x-1)/number+1"') do>nul 2>&1 (
md %%j
move "%%i" %%j\
)
)
)
endlocal
exit /b
*************************************************************************************
Thanks and credit to Yury for the program.
bristlehog wrote:It's a problem (Turbo C++ 1.0 cannot work with LFN), but it can be solved. Do other conditions (DOS platform, copy instead of move and skipping the directories) suit you? Would you prefer Windows console version?
Many thanks, mate, but it's no longer necessary. It is very good of you to offer, though, and I really appreciate it.