Skip to main content
Version: v6.5.0

List files or folders

Command Description

List SharePoint files or folders

Command Prototype

arrayRet = SharePoint.DirFileOrFolder(spCtx ,strRelPath ,dirType)

Command parameter

parameterrequiredtypeDefault valuedescribe
spCtxTrueexpressionspCtxObjects returned by connecting to a SharePoint server
strRelPathTruestring""SharePoint relative path
dirTypeTrueenum"fileandfolder"Listed object types

Return result

ArrayRet, Assign the result of running the command to this variable.

Run instance

/*********************************列出文件或文件夹************************************
命令原型:
arrayRet = SharePoint.DirFileOrFolder(spCtx ,strRelPath ,dirType)
入参:
spCtx--SharePoint对象.注:连接SharePoint服务器返回的对象
strRelPath--路径.注:SharePoint相对路径
dirType--类型.注:列出的对象类型
出参:
arrayRet--函数调用的输出保存到的变量.
注意事项:

********************************************************************************/
Dim arrayRet = ""
arrayRet = SharePoint.DirFileOrFolder(spCtx ,"" ,"fileandfolder")
TracePrint(arrayRet)