I am trying to move Portal items from the root directory to a new folder I create. This works when content is stored in a folder I already created but not from the root/home directory under MY CONTENT.
The docs say "You can move content out of folders to root by calling the move()
method and specifying /
as folder name"
This is the code:
for folder in folders:
folderitems = adminuser.items(folder= '/')
for item in folderitems:
item.move(folder= 'New Folder')
This is the error:
ValueError: Could not locate the folder: /. Please verify that this folder exists and try again.
Solved! Go to Solution.
The answer was found in the help:
"For content in the root folder, use the default value of None for the folder argument. "
This can be written as:
folderitems = adminuser.items()
The answer was found in the help:
"For content in the root folder, use the default value of None for the folder argument. "
This can be written as:
folderitems = adminuser.items()