Bulk delete attachments

Consu July 20, 2014

Hello all,

apologies if it is something obvious but I am missing on this...

Is there a way I can delete multiple attachements from a space without doing one by one? I have ca. 300 images I need to remove from a few pages and I dread the idea of deleting one by one...

thanks for the help!

3 answers

1 accepted

0 votes
Answer accepted
Consu July 27, 2014

No matter what I tried I had issues connecting on Windows 7, this seems to be caused by security features, however worked perfect on XP

As a workaround I used Bitknex ( http://www.bitkinex.com/ftp/client/bitkinex323.exe)
I tried it on my local machine under Windows 7 it worked without any issues :D!!

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2018

Hello,

You could also use the Power Scripts for Confluence add-on:

https://marketplace.atlassian.com/apps/1219507/power-scripts-for-confluence?hosting=server&tab=overview

It is a free add-on. I've found Power Scripts for Confluence really handy for Confluence admins who want to automate their work and apply bulk actions to Confluence.

You could write a script like this:

number pageId = 123456;
deleteAttachment(pageId, "attachmentToDelete.txt");;
Richard Cross October 10, 2019

This doesn't solve the OP's problem.  What you've suggested is only going to delete a single attachment.  What if you have hundreds of attachments to delete?   

I looked through the docs for this plugin, but there's no "routine" that gets all attachments for a page, or even a partial list based on a regex.

0 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2014

Look into the WenDAV plugin for Confluence. It will allow you to work with Confluence as f it were a file system ... which will give you the ability to select multuiple files at once and delete them en mass. Be careful though. With great power comes great ability to mess up everything.

Consu July 22, 2014

thanks David, I will try WebDav.
It seems to me that the documentation about the plugin is really bare. Have you by any chance heard of any other source where I can learn more about WebDav? (ehmm, I never used it before, I am afraid...)

thanks

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2014

First of all I'm using Windows, so I only know what I've done. If you are using Linux or a Mac, then I'm not sure what to do there. But if you are on windows you can map Confluence to a drive letter. I chose "O" for "Oh my goodness, this is so cool." :) This is the UNC path to map it to a drive letter. Replace {sever} with your sever name. Be very careful with it though. You could easily delete more than what you want.

\\{server}\DavWWWRoot\plugins\servlet\confluence\default\


Consu July 23, 2014

Thanks, this is great, I will try it out! (LOLing about the O drive :D)!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events