Gilbert,

Can I interrupt here?

The original...

code:

rd $tempdir_data[$array_count]
while $array_count >= 0
rd $tempdir_data[$array_count]
$array_count = $array_count - 1
loop
return

Can you change it to?

code:

while $array_count >= 0
rd $tempdir_data[$array_count]
$array_count = $array_count - 1
loop
return

In other words, you want to test if the $array_count >= 0 and if it meets that condition, then remove the directory.

Back to your lesser point:

quote:

$fav = %userprofile% + "\favorites"
$rec = %userprofile% + "\recent"

Why don't you use?

$fav = READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","favorites")
$rec = READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","recent")

This way, you don't have be dependent on Environment variables and these keys are consistent whether it is 9x/NT/2k.

HTH,

- Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's