Harold,Thanks for the code. That problem bugged me a bit so I came up with a slightly different angle of attack that night. Technically, it may not be the most efficient (though it makes better use of memory), but this is splitting hairs, especially for the application of this script!
My whole script is now approximately 4 pages long. It is used to migrate user's data from one machine to another as our sales force is getting new notebooks. The script determines if the machine is a new one or old one, and simply does file copying. Here is the part that determines what 'machines' are available on a Jazz tape (many machines can exist on a single tape organised by user name) and renames the machine name as per our naming convention.
I tried to have the script determine the last directory created so that I could have that as the default, but it seems that 'comparefiletimes' only works on files. 
If anyone sees any room for improvement, please do give it up! 
../mk (Marc Knoop)
***********************
$hlpfl = "doit.hlp"
shell "%comspec% /c dir /ad /b > $drv$hlpfl"
$null = open(2, "$drv$hlpfl", 2)
$cntr = 0
while @error = 0
$cntr = $cntr + 1
$tmpval = readline(2)
if $tmpval="RECYCLED" or $tmpval=""
$cntr = $cntr - 1
else
at ($cntr+5,2) $cntr
at ($cntr+5,5) $tmpval
endif
loop
$null = close(2)
at (20,2) "Please choose a directory to copy to target machine (enter #)..."
if $cntr < 10
$tmp = 10
while $tmp > $cntr
at (24,75) get $tmp
loop
else
color r/n box(22,32,24,36,full)
color w/n
$tmp = 100
while $tmp > $cntr
at (23,33) gets $tmp
loop
endif
$null = open(2, "$drv$hlpfl", 2)
$cntr = 0
while @error = 0
$cntr = $cntr + 1
$tmpval = readline(2)
if $tmpval="RECYCLED" or $tmpval=""
$cntr = $cntr - 1
endif
if $cntr = $tmp
$uname = ucase($tmpval)
$null = close(2)
goto GOTIT
endif
loop
:GOTIT
$null = writevalue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP", "ComputerName", "RMSMWP$uname", "REG_SZ")
$null = writevalue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\ComputerName\ComputerName", "ComputerName", "RMSMWP$uname", "REG_SZ")