Skip to content
English
  • There are no suggestions because the search field is empty.

Mass Purging Perceptive Content OSM Folders Before Cutover

How to quickly delete all documents and folders from a Perceptive Content OSM location from the command prompt. We typically do this during server migrations and upgrades to clear out documents created in the new production environment before final cutover.

Overview

During a server migration or upgrade, documents often get created in the new production environment during testing. Before final cutover, those files need to be cleared out so the new environment only has the migrated content. These two commands run together to wipe a folder fast. The first deletes every file. The second removes the leftover folder structure.

Run Command Prompt as Administrator. Use an account with delete rights on the target folder.

⚠ Warning: These commands permanently delete files. Nothing goes to the Recycle Bin and there is no undo. Double-check the path before you run anything, and make sure you’re pointed at the new environment, not the source.

Commands

del /f /s /q <FolderPath> > nul rmdir /s /q <FolderPath>

Placeholders

Placeholder Replace with
<FolderPath> Full local or UNC path to the folder you want to purge

Examples

Purge an OSM folder on the new server using a UNC path:

del /f /s /q \\NewServer\OSM\osm_01.00001 > nul rmdir /s /q \\NewServer\OSM\osm_01.00001

Purge an OSM folder from the server itself using a local path:

del /f /s /q E:\OSM\osm_01.00001 > nul rmdir /s /q E:\OSM\osm_01.00001

What the switches do

Command / Switch What it does
del Deletes files
/f Forces deletion of read-only files
/s Deletes matching files in all subfolders
/q Quiet mode, so it won’t ask for confirmation
> nul Hides the output. Skipping the screen output makes large deletes run much faster
rmdir Removes a directory
/s Removes the folder and everything in it
/q Quiet mode, so it won’t ask for confirmation

Notes

  • Run del first, then rmdir. del clears out the files quickly, and rmdir cleans up the empty folder tree that’s left behind.
  • rmdir removes the top-level folder too. If Perceptive Content expects that folder to exist, recreate it before the cutover copy.
  • This only removes the files on disk. It doesn’t touch the Perceptive Content database, so the document records need to be handled separately.
  • Repeat for each OSM folder you need to purge.
  • If a delete fails because a path is too long, empty it with robocopy instead: robocopy <EmptyFolderPath> <FolderPath> /MIR.