Vinzent03 / find-unlinked-files

Find files, which are nowhere linked, so they are maybe lost in your vault.
MIT License
293 stars 14 forks source link

After finding more than 200 unlinked file, how can I delete them? #20

Closed zhao414 closed 2 years ago

zhao414 commented 2 years ago

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?

Vinzent03 commented 2 years ago

There's a setting, where you can specify the file extensions to delete via similar named command.

zhao414 commented 2 years ago

:) 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

Vinzent03 commented 2 years ago

Why 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

zhao414 commented 2 years ago

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.

Vinzent03 commented 2 years ago

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.

Vinzent03 commented 2 years ago

I released 1.4.0. Just set the field to * to delete all files.

zhao414 commented 2 years ago

Thank you for the update, i will have a test soon. :)