参考:
http://www.foxtable.com/webhelp/topics/0331.htm
For Each dir As String In FileSys.GetDirectories(projectpath & "attachments\data")
For Each File As String In FileSys.GetFiles(dir)
dim fn as string = FileSys.GetName(File)
dim dh as string = fn.split(".")(0)
dim dr as datarow = datatables("文件库").find("档号='" & dh & "'")
if dr isnot nothing then
dr("数字档案") = FileSys.GetName(dir) & "\" & fn
end if
Next
Next