Can I find the Last used directory

I am using attachfile = uiws.OpenFileDialog(False,“Select a file to attach”) to attach files to a document. This is behind a number of buttons on the document. This always opens the Notes/Data directory for the user to select a file.

My users ask if its possible to open the last used directory rather than Notes/Data, thus saving them a few mouse clicks. I can see how to open a specific directory - use the initial directory parameter - but how can I identify the last directory used?

Any & all ideas much apreciated.

Sue

Subject: Can I find the Last used directory

You will need to store the last used directory for each user, either in a profile document or as an environment variable in the ini file. You can then identify the last directory used.