recycleFile
Moves a file to the $RecycleBin subfolder of the file upload location.
Syntax
Copy
function recycleFile(fileRealName: string): void
| Parameter | Description |
|---|---|
fileRealName
|
Unique internal ID (real name) of the orphan file. |
Examples
In this example:
- We store information about all the orphan files in a variable called orphans. For details, see getDeletedFiles.
- We move all orphan files to the Recycle Bin based on their RealName.
Copy
orphans = getDeletedFiles(null, null, null);
orphans.forEach(function(item, index, array){
recycleFile(item.RealName);
});