Closed zhao414 closed 2 years ago
There's a setting, where you can specify the file extensions to delete via similar named command.
:) thank you for the reply.
I use this plugin to identify the useless attachments, whose file type varies.
And the following is the solution I figured out yesterday: after using your plugin to identify the unlinked file in the attachment folder, I then
unlinked files output.md
file into the attachment folderwhile read fileName; do rm "$fileName"; done <unlinked\ files\ output.md
to delete those unlinked files.
find
rather than rm
can handle the result of a global unlinked file searchWhy so complicated? Simply enter all your file types comma separated in the plugin's settings. For example md,pdf,png,jpg
. Call the command Delete unlinked files with certain extension
Is it possible to provide a feature to delete all the found unlinked files without considering the extension? or using a wildcard like .*
to apply this deletion to any file extension?
The file extensions in my case including imgs(jpg, jepg,heic,png,etc), pdf, doc, docx, pdf, ppt, xlsx, and a lot of archives such as rar, zip, 7z, tar. So I think it is a little bit annoying to have to specify each of them. And in the end, after specifying all the file extensions, one will have to call the finding unlinked file command repeatedly to see if there is any file extension is missed during the deletion. That is not so convenient.
Oh, I haven't thought of so many different file extensions in a vault. Adding *
to delete all file extensions sound like a great idea.
I released 1.4.0. Just set the field to *
to delete all files.
Thank you for the update, i will have a test soon. :)
Sorry for the disturbing. My question is: after getting a long list of links linked to the unlinked file, looks like - [[xxxx.png]], I want to have all of these files deleted. How can I do that effectively?