Has anyone managed to get the RD command to function in a Kix Script?

I am trying to delete certain directories and nothing, but nothing happens. Is it my script?

code:
$liste_postes="\\sntfic03\echange\adminflux\postes.txt"
IF Open(1,$liste_postes) = 0
$machines=ReadLine(1)
WHILE @ERROR=0
$lehman_mesdoc="\\$machines\c$\mes documents\leh_data"
RD "$lehman_mesdoc"
$machines=ReadLine(1)
LOOP
ENDIF
close(1)
EXIT(1)

I ran a test to see if it was reading the file contain the machine names correctly and it is, but the script refuses to do what I want it to do.

I thought maybe the problem was because the directory was not empty, but I made an empty test directory and the script didn't delete it.

Anyone have an idea?

Thx in advance,
Z.

[ 21. November 2002, 11:14: Message edited by: zdarma ]