Read the manual entry on Dir().

You need to iterate the directory contents and change each file.

A simple (not tested) example would be:
code:
$sFile=Dir("C:\TEMP\*.*")
While $sFile <> "" AND @ERROR=0
"Setting file C:\TEMP\" $sFile " to read only..." ?
$=SetFilAttr("C:\TEMP\" + $sFile, 1)

$sFile=Dir()
Loop

Note, you will need to add code to deal with the "." and ".." special entries, and sub-directories.

If you need to recurse subdirectories look in the UDF forum for examples.