Forum moved here!

Home / Remember last folder


Hi! I’m using Sumatra PDF portable on three computers (all Win 10 pro). On one of them, if I choose rename (F2) the explorer window opens the last directory I saved (renamed) file to. On the other two, F2 opens the temporary folder the file is currently located at. How can I make Sumatra open the last used folder on the other two computers?


The choice of default locations appears to be fully controlled by windows, that is per the 2 working the same way it is normal to expect to start in the folder where the file is.
So the question is what is possibly changing that on the 1 where it jumps to “last used”.
Recent underlying "enhancements " to windows are the use of “File History” and “Quick Access”

Most home users would not have switched File history on since it eats up storage but I cant discount that it may be set different on each machine.

More Likely is a difference in “Quick Access” since that can pull navigation from current directory towards last used".

This I suspect to be the “culprit” for your reasonable but non standard desire, so I would look closer at the difference in how that is set in Windows.

You may first look at the check box in “Folder Options” labelled
Open File Explorer to This PC OR Quick Access
also see “Privacy” Show recently used files in Quick access

Other possibility’s include 3rd party “apps launcher/wrapper” or “file explorer”

If you track down the difference it helps others if you post your findings back here :slight_smile:


Thank you for your reply! I also suspected that Windows/File Explorer handles that but Explorer settings and relevant 3rd party apps are the same on all three computers. On all computers File Explorer is set to open Quick Access and both check boxes are checked under Privacy. Also, top of the list of Quick Access is also the same on all computers. I haven’t tried to find any registry differences I was hoping there’s a hidden option in Sumatra settings.


I have not been able to bottom out this behaviour yet on differing machines
what could have an effect is that you say “portable” but is there a difference in start up folder and is there a chance an older installed copy is interfering

It is possible that settings in SumatraPDF affect its default behaviour I don’t think there any “hidden” settings however the related advanced settings to compare are

RestoreSession = true or false
ReloadModifiedDocuments =
FullPathInTitle =
RememberStatePerDocument =
RememberOpenedFiles =

getting back to file explorer its default behaviour may be affected by
version ? (there have been core changes over the past two months)
user account control ? ( do you have exactly the same user rights on all pc’s)
other folder options such as navigation pane e.g. “expand to open folder”
also when opening “save as” or rename is the appearance the same i.e. is navigation pane active / inactive

hope some of that helps

My observation on my updated windows 10 with SumatraPDF Installed
If I open two separate copies of the same file EACH one will try to “Rename” in their OWN source folder (as expected), However If I try “save as” BOTH will default to wherever I last OPENed OR SAVEd one which can change as I open more (again as expected)


Thank you for your reply. All computers have the same Windows version, same user name and rights and same SumatraPDF version. And yes, the expected behaviour is like the two computers are doing. But after I realized that one somehow remembers the last folder used to rename to, I started to look for how to make the other two behave the same (I liked it).
In the end I found it to be easier to write an Autohotkey script to change the folder every time F2 was pressed.


Thanks for feedback.
I have been watching out for the “odd” behaviour but have yet to encounter it on any of my set-ups, so over time will continue to see if I can find any that mirror your experience. I suspect that during Win 10 development there were related “issues” over such behaviour and that the “odd” one may have followed a different update path than the other two.

Anyway since your solution may help others with a similar desire to keep the rename / file save focus on a single directory ,would you care to share, even if is a bit raw / dedicated to your usage?


Sure, probably not the most elegant but gets the job done:

#SingleInstance force
if !WinExist(“Rename To”)
;Waiting for Rename To window to become active
WinWaitActive, Rename To
SendInput Drive:\Path\to\folder{Enter}
;Doesn’t run if Rename To window already exists (not to iterfere with Listary’s features (
WinWaitClose, Rename To


Neat, thanks James
I tried this changing “Rename To” to “Save As” and it obviously works for ANY application such as Notepad etc. which could be useful to keep ALL my file saves per session focused initially to a known project location, as its easy to change target directory with “Edit” and “Reload” , it may become a keeper :slight_smile: