How to recursively delete folder using CloudBerry Explorer PowerShell Plugin

206 views Asked by At

I am trying to delete an entire folder including subdirectories on Amazon S3 using cloudberry explorer pro.

Currently, I have:

$s3 = Get-CloudS3Connection -Key $Key -Secret $Secret
Set-CloudOption -UseCompression 1
Set-CloudOption -ThreadCount 10
Set-CloudOption -UseChunks 1 -ChunkSizeKB 100000
$currentmodday = (get-date).dayofyear%3
$destpath = "bucket-cb-backup/daily/" + $currentmodday + "/"
$destpathtorem = $s3 | Select-CloudFolder -Path $destpath
Remove-CloudItem -Folder $destpathtorem -Filter *

This removes all files in that folder, but leaves subfolders and the files they contain still in place. I just want a recursive delete.

1

There are 1 answers

0
evgeny On

This is not implemented in CBL Explorer Snap-In unfortunately. You may want to iterate through entire structure and delete each content of subfolder.