How do I delete long file paths on Windows Server 2012 based systems?

Older Platform Servers run on Windows Server 2012 which cannot support file paths over 255 characters. This can lead to a failure to delete the contents of Platform Spaces through the web interface.

WARNING! The following is purely destructive and there is no restoring the data in the directory you target. Be very cautious when performing this operation.

If you need to delete data that appears to be inaccessible due to long file paths in Server 2012, the following steps will allow you to do so:

  1. Log into the server locally or through Remote Desktop.
  2. Create a New Folder on the root of StorageGroup01 Take note of the Drive letter on StorageGroup01 (the default is D: and will be used in this example)
  3. Open an Administrator Command Prompt.
  4. Navigate to the folder you want to clear the contents of, Right Click the folder while holding the Shift Key and select "Copy folder as pathname"
  5. Type out the following command replacing FOLDER TO DELETE with the path name you copied earlier (right click within the command prompt and select paste):

robocopy "D:\New Folder" "FOLDER TO DELETE" /mir

You need to keep both paths within quotations if they have any spaces throughout the pathname. Be aware this command is destructive and there is no way back from this method of deletion outside of data recovery.