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

How to delete large folder structure in FileCloud

Original Question or Issue:

Trying to delete a large folder structure, using the web UI to delete the files ends in an error.


Environment:

  • Product - FileCloud Server
  • Version - Any
  • Platform - Any

Steps to Reproduce:

  1. Log in to the FileCloud web UI.
  2. Navigate to the large folder structure you want to delete.
  3. Select the folder and choose the delete option.
  4. Observe the error returned by the web UI.

Error or Log Message:

A generic browser timeout or HTTP 500 error is typically observed in the web UI. No specific error code is documented for this issue. Check the FileCloud server logs for additional details.


Defect or Enhancement Number:

 


Cause:

The FileCloud web UI has a timeout limitation when processing delete operations on large or deeply nested folder structures. The request exceeds the server's maximum execution time before the deletion can complete, resulting in an error.


Resolution or Workaround:

FileCloud has a command line tool, rmutil.php, that can be used to delete files directly from the command line. More details about the tool can be found in the link here.

Although the link specifies deleting files in the recycle bin, the tool can be used to delete files under any path in FileCloud. 

If the files under the folder "Test Folder" in user account "user1" needs to be deleted then the command should be executed as follows.

Windows: 
cd C:\xampp\htdocs\resources\tools\fileutils
For Simulation:
C:\xampp\php\php.exe rmutil.php -h default -u user1 -p "/user1/Test Folder"
For Actual Delete:
C:\xampp\php\php.exe rmutil.php -h default -u user1 -p "/user1/Test Folder" -r 1

Linux:
cd /var/www/html/resources/tools/fileutils
For Simulation:
php rmutil.php -h default -u user1 -p "/user1/Test Folder"
For Actual Delete:
php rmutil.php -h default -u user1 -p "/user1/Test Folder" -r 1

For multi-tenant environments, supply the tenant site URL as the -h value instead of default. For example: -h tenant.example.com 


Notes:

Important: Always back up your data before performing any mass delete operations. Deletions made using rmutil.php with the -r 1 flag are permanent and cannot be undone.