Thanks Cris that worked for me...
But now I have another problem...since the folders is userprofiles in a windows network it contains subfolders and files in them.
Is there a way to check in the userprofile directory if there is any subfolders or not and the if there is go in and delete files and folders
Now I use this code
SET DEFA TO "c:\test\"
= ADIR(array,'*.*')
filename = array(1, 1)
if !empty(filename)
FOR i = 1 TO ALEN(array,1)
filename = array (i,1)
scan
if file(location + filename)
! ATTRIB -R &filename
erase addbs(location + filename)
endif
endscan
endfor
endif
It may look amatuerish since I am a beginner.
So how can I find if there is any directories??
thanks
Michael