I am familiar with the move command, but it cannot move a complete directory with subdirectories

Here's the code :

code:
  
$listvartest = "c:\test\*.*"
$dirlisttest = dirlist($listvartest,1)
For Each $sFilem In $dirlisttest
$x = SubStr($sfilem, Len($sfilem), 1)
If $x = "\"
$rc=isinarray ($allowedsubdirs,$sFilem)
If $rc = 0
MD "c:\backup\test\" + $sfilem
Shell "%comspec% /c move /Y " + Chr(34) + "c:\test\" + $sFilem + "*.*" + Chr(34) + " " + Chr(34) + "c:\backup\test\" + $sfilem + Chr(34)
RD "c:\test\" + $sfilem
EndIf
EndIf
Next

But it doesn't work for subdirs with a subdir (get it ?)

[ 09. October 2003, 20:48: Message edited by: j0ep ]