0

My program is small and simple. It functions as a text editor with the exception of using credentials and encrypting save files.

Though it is arguably arbitrary once encrypted, I strongly desire these files stay in the local filesystem or company network.

The question:

Should I choose a default save location for the user or have the user select a location if none is stored? If I am selecting a default location, what is best? Should I create a new application folder to save these files?

(My target system is Windows 7 though I am certainly welcome to OS-neutral best practices.)

Please Note:

  • The more natural (less user interaction) option is preferred but not mandatory.
  • I am not talking about configuration files, but rather working project files.
  • I have puzzled over this seemingly simple question to the point where I am okay putting myself at risk of criticism by the brilliant but tough SO community.


Why I believe this is a valid question and not an opinion grab:
  • I was unable to find a satisfying -or even applicable- answer in google with the search terms 'where to save project files' 'programming save file best practices' nor 'preferred default save location windows 7'
  • I am certain, though my question is simple, the answer matters - that there is a desirable, preferred, user-friendly filesystem save strategy
  • I do believe there is simple subset of truly good answers
  • I do believe the internet will be a better place by having the answer to this question easily searchable

Thank you.

  • 1
    The user's Documents folder is the conventional place. Just make sure you use the proper API to look it up. (There are a number of existing questions and answers on that subject.) – Harry Johnston Dec 04 '15 at 01:23
  • Possible duplicate of [Get path to My Documents](http://stackoverflow.com/questions/2414828/get-path-to-my-documents) – Vladislav Rastrusny Dec 04 '15 at 12:11
  • @VladislavRastrusny Thank you for your interest . The linked Q/A is one possible solution. However, I would argue my question is unique in that it does not assume using Windows 'My Documents' is the best place to store these files (though it's certainly logical) and it also begs whether these files should be stored in an app folder or placed top level. In fact, the question makes no assumptions at all with the exception that there *is* one, right, natural place to store these files. – Darkmushroom Dec 04 '15 at 12:43
  • Well, if that is you, who don't assume, that Documents folder is not a good place for `documents` or `working project files`.... I think you have a very specific case here ;) I doubt I can help here since I am not you ;) – Vladislav Rastrusny Dec 04 '15 at 12:46
  • @VladislavRastrusny It's a great place to store them Vlad! I am not disagreeing with you at all. :) I encourage you to make an answer of this stance with a little dash of historical reasoning and a little input on whether or not it is good, bad, or inconsequential to place the files in a folder in my documents versus placing the files directly in my documents. – Darkmushroom Dec 04 '15 at 12:59
  • I see. Well, I don't have anything to share, let's see if anyone has any fresh ideas on the subject ;) – Vladislav Rastrusny Dec 04 '15 at 13:00

1 Answers1

1

As vlad and harry have noted in their comments, the My Documents folder is a standard place to store project files, and I'd recommend choosing the documents folder if you decide to save files in one location by default.

However, since the project you mentioned is essentially a text editor, I'd recommend you give the user the option of selecting a directory to save the file in.

This way they will have the convenience of saving the document they're working on in whichever directory they choose, be it on the local disk, a network location, or on a flash drive that they need to move between machines.

To be specific, if your project will only be saving one file at a time, like Notepad, the best option may be to prompt on each occurrence.

This may be a nice option if you have several documents for each project as well;

I personally favor the way that Visual Studio handles this - there is a default directory for your project files to be stored in, and you do have the option to change it if needed.

schizoid04
  • 888
  • 1
  • 11
  • 27