> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: moveFoldersToTrash(folderIds: Array) # Method package: wixMediaBackend # Method menu location: wixMediaBackend --> MediaManager --> moveFoldersToTrash # Method Link: https://dev.wix.com/docs/velo/apis/wix-media-backend/media-manager/move-folders-to-trash.md # Method Description: Moves single or multiple folders, including their files and sub-folders, to the Media Manager's trash. The `moveFoldersToTrash()` function returns a Promise that resolves when the folder(s) are moved to the Media Manager's trash. Moving many folders to trash at once is an asynchronous action. It may take some time for the results to be seen in the Media Manager. Use the Media Manager to restore or permanently delete trashed folders. Attempting to move already-trashed folders to trash again doesn't result in an error. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Move a single folder to trash ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { mediaManager } from 'wix-media-backend'; /* Sample folderIds array: * [ * 'de4e7c3258f444e9a506a8572d951ddf', * 'a2597566072c463492f9963c377f3f74' * ] */ export const myMoveFoldersToTrashFunction = webMethod(Permissions.Anyone, (folderIds) => { return mediaManager.moveFoldersToTrash(folderIds) .then(() => { console.log('Success! Folders have been trashed.'); }) .catch((error) => { console.error(error); }) }); /** * Returns a promise that resolves to **/ ``` ---