To check if a folder exists in the CMS already you have to create a folder list.
There is no direct commands to do this.
To create a folder in the CMS, first make a Model that only contains a folder.
Then do the following:
The parameters for the asset.create("label", "Path", "Model to use", content or dictionary)
There is no direct commands to do this.
dim folderExists
folderExists = false
set folderlist = asset.getFolderList("/path/")
'loop through folder list
do while folderlist.nextEntry()
if folderlist.item("_cmsLabel") = "foldername"
folderExists = true
exit do
end if
loop
To create a folder in the CMS, first make a Model that only contains a folder.
Then do the following:
if folderExists = false then
'create folder
set dict = system.createDictionary()
fId = asset.create(folderName, "/Site/Global/Picture of the Week/", "/System/Models/Directory Builder", dict)
end if
The parameters for the asset.create("label", "Path", "Model to use", content or dictionary)
Comments