Forum moved here!

Home / Feature Request: Recycle and Explorer options

LHG

Apart from the fact that it is lightweight and fast, one of the most valuable features of Sumatra is the “Open in…” options of the File menu, e.g. ExternalViewers.
I often use Sumatra as a dispatcher: PDF downloads from the net, email attachments, document scans or explorer double clicks go directly to Sumatra. I quickly check or proof-read the contents, then send the file to PDF-Xchange for more editing, to Adobe Acrobat if it is a form to fill, or rename the file depending of the contents, save the file as…, etc…

I would really like to be able as well to directly:

  1. delete the current file (or even better, send it to the recycle bin)
  2. open the Windows explorer with the current file hilited (explorer /select,“current file”)
    It would even be better if both options were available as an icon in the toolbar.
GitHubRulesOK

@LHG
There are some things to consider in your request

When a file is opened in most applications a file “lock” is applied, so its not normally possible to delete say a word doc whilst your reading it. SumatraPDF only needs to lock larger files and intentionally does not for small files that can be locked by other editor applications such as TeX.

So yes it would be easy to add a del %1 to your file menu to appear as Open with Delete :slight_smile: but note it will only work for files under 10Mb in version 3.1.2 and previous now increased to 32Mb in version 3.2 pre-release and its so risky to have such a dodgy command where you could trigger easily I’m not going to elaborate on that, you correctly identify send to bin as safer but I do not know the command for that (move to recycler folder ?) and it would be subject to the same limitation when files are locked. So the safest and simplest way to script an addin to the SumatraPDF File Menu is as described in Add "Delete" option · Issue #633 · sumatrapdfreader/sumatrapdf · GitHub you could easily adapt that to move files to recycle bin or add a second command to build a MoveLater.cmd to any single folder of choice. To make it more complex such as move this file to that folder but move other type to other folder would involve a bigger sequence of steps (not impossible just more specific) .

F2 should 99% of the time highlight the current file
[update] Version 3.2 and onwards has exactly as requested above a new option to “Show in folder” English shortcut is ALT F F

The v3.2 toolbar is unchangeable except for painting your own icons (i.e no key map change or additions )
[update] Versions after 3.2 do not allow changing icon images as they are now SVG including the two new rotate icons.

LHG

Thanks a lot for your very fast reply - almost as fast as Sumatra itself :wink:.

As for the recycle file option, I did not think it would be difficult, there are many small utilities on the net to do just that from the command line, so yes, I could “Open with Recycle” and then terminate Sumatra by hand.

As for the explorer option, yes F2 does some of it, but thinking of Sumatra as a dispatching tool, it should terminate after having started the explorer.

Oh well, all this is not that important…

Has the feature of being able to modify the toolbar already been discussed ?

GitHubRulesOK

Hundreds if not more requests to change “this and that” especially the toolbar but oddly no one has provided the code to do it.
Strictly not 100% true, some have made valiant attempts to add a few icons but it needs to be consistent with the other code so as not to not cause clashes / error conditions etc.

Actually tried a few options and for now recycle bin is playing hide and seek (I tried to add to send to and it went invisible on me, tried to rename a shortcut but that ended up in the trash :slight_smile:

I think it is safest to use a technique such as add selected file to a list
e.g. Open in Add to trash list
cmd.exe /c echo del "%1" >>"path to \trashlist.cmd"

then only you can start that command after reviewing and/or editing at end of session

gnuarm

The reason why there are lots of requests and very few code work is because the vast majority of people using Sumatra are not programmers. I know it would be a lot of work for me to even begin installing the tools much less learn about the code base.

I’m not sure why people create open source software if they expect every user to be able to contribute other than to offer ideas of ways to improve the tool. Let’s face it, most people barely know how to use a tool like this much less how to begin thinking about making updates.

gnuarm

That said, thanks to everyone who does know how to make updates and provide support for this great tool.