getting closer!!!

here is my test.kix
Code:
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

Dim $File
For Each $File In ReadFile('\\Server\share\delete_these_files.txt')
If Exist('C:\Program Files\'+$File) and len(join(split($File),""))
? 'C:\Program Files\'+$File
? 'Deleting Files -> '
del "C:\Program Files\"+$File+"\*.*" /s /c
@serror
? 'Removing the Directory -> '
rd "C:\Program Files\"+$File
@serror
endif
next

Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction



my delete_these_files.txt
Code:
pics from home
my profile.backup
hotties
tester



and here is the output (when the tester dir is empty) (tester is a dir i creted myself to test the scrip)
Code:
c:\test.kix

C:\Program Files\pics from home
Deleting Files -> Access is denied.
Romoving the Directory -> The directory is not empty.
C:\Program Files\my profile.backup
Deleting Files -> The system cannot find the file specified.
Removing the Directory -> The Directory in not empty.
C:\Program Files\hotties
Deleting Files -> The system cannot find the file specified.
Removing the Directory -> The Directory in not empty.
C:\Program Files\tester
Deleting Files -> The system cannot find the file specified.
Removing the Directory -> The operation completed sucessfully.



when the tester dir is NOT empty i get
Code:
C:\Program Files\tester
Deleting Files -> The system cannot find the file specified.
Removing the Directory -> The directory is not empty



I can manualy delete the files so I'm sure it's not a permissions problem.