The ethics of using 'My Documents' as a dumping ground [closed] - storage

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Something I've wondered about for a while now and would like to get a general opinion on:
Advanced apologies if this has been asked previously, I did a search and couldn't find anything similar. This question is related to questions like, "Correct location to save a temporary file in Windows?" , but not quite the same.
I've noticed over the years spent with Windows, from XP to Vista and now to 7, that the 'My Documents' directory has slowly turned from being a place where you're encouraged to place personal 'stuff' into a dumping ground for any junk any random application wants to store.
For example, if I look now at the 'My Documents' directory on my work xp machine, there are folders for Adobe, FX Composer, Maya, Processing, Visual Studio 2005/2008, Visual Studio Samples, Window Clippings, Evernote.... the list goes on and on.
In fact, the last thing that I'd ever use that folder for now is storing my 'stuff' - the very thing it was intended to do. I personally find storing my actual documents in there, along with these random application settings too disorganized and painful to sort through. Plus there are added headaches with backup software etc... The signal to noise ratio just becomes appalling.
Lamenting aside, I now find myself in the position of writing some code where I want to store some settings related to my application. These settings ideally should be 'global' (our software gets regular updates), so storing them in some Program Files directory that's likely to be ephemeral won't work. While settings themselves could be stored in the registry, what about backup files, compressed archives, samples, etc etc...
So really what I'm asking is, what's the right solution for this situation? Do I follow the crowd and use 'My Documents' as a dumping ground? Is that folder a write-off anyway, or am I adding to the problem?
Do you use 'My Documents' as a storage area for your applications? Do you share my frustration with all the junk that turns up in there?
The users of my software are semi-tech-savy, so would probably understand it's just a directory like any other (and so could handle it being elsewhere) - but I guess Aunt Edna isn't going to understand that, so does the answer depend on context?
Thanks in advance!
Edit:
Thanks for the suggestion of %APPDATA% - I guess this is fine for application settings and files that shouldn't be exposed to the user, but what about files that might be useful for the user to move/manage themselves? Is My Documents the only solution or should I still stick to %APPDATA% ?

If these are application-private files (i.e. not user-visible documents) then isn't this what the %APPDATA% folder is for?

Just make this configurable at install time, and later by the user. Ideally give them just two choices, one being My Documents and one being APPDATA.
Make APPDATA the default but do allow this to be easily changed at install time for enterprise admins who want everything in the My Documents folder which is automatically archived.

Not a good idea as a 'dumping ground', but it simplifies backup, for a start.
In my workplace, users' My Documents folders are all on a network drive for ease of capture by an automatic backup system.

Just because applications are dumping stuff into "My Documents" doesn't mean they should. At the very least, if you need to dump things there, then make the folders hidden. Really, you should use %APPDATA%.

I'd say that Application Data is the place to keep settings etc., whilst My Documents (possibly in an application-specific sub-folder) would be the default place to keep output data files produced by your application.
Having the latter configurable via your installer / application settings dialog would be the nicest all-round solution.

How about following the unix/linux tradition of storing it under ~/.app_name? Just make sure it's hidden, and ~ could be the "My Documents" folder

In any of your library windows ( documents music video etc... )
just click the locations menu ( on the left side of your document pane's menu opposite the right side of the pane which contains the other menu: the folder drop down menu, for folder types )
it will be called locations or if you already have more than 1 location the menu will be called: Includes: n locations.
Just click that location menu and you can add as many document directories you want.
You can change the order so your specified directory is the primary viewed documents folder. ( And you can choose the default save folder to be the original folder. applications then dumped to the original default location, leaving your primary location pristine )
However in some navigation windows all the locations are viewed together as one huge documents folder.
( although messy you do have the advantage of navigating all those locations at one... so I suppose those search window prompts make sense? )
You can set a system env so that Maya will use your clean primary custom documents location instead of the default save location.
in the system properties control panel's advanced tab:
create/or edit a system variable for...
MAYA_APP_DIR
E:\myCustomDocs\Maya
( I use a different fast hard drive to save on my SSD system space. )
For added flexibility look up setup of hard link soft links and symbolic links!
where directory pointing as simple as:
mklink /J [old location] new location
Gives you alot more options and power!
Hope that helps?

Related

In PHPstorm , is any way to avoid save all open documents instead current active document? [duplicate]

My traditional workflow must be a little different to the PHPStorm default. I often work on multiple files at the same time and want to be able to save just one file when I've finished with it, without saving the others that I've modified.
I've managed to turn off the auto-save feature. Now, when I edit files I get stars on the ones I've edited and they stay like that until I hit 'save'. So far so good.
But when press CTRL-S to save, expecting it to save the one file I'm looking at so I can go back to the ones with asterisks to polish them off too, it also saves ALL the other files too.
I hope there's some way to change this behaviour or set up something to allow me to save just one file at a time!
Yes, you can .. but that still does not change a lot (e.g if you change your settings, or run/re-run something -- all files will be saved automatically anyway). Eventually (after few weeks or month of adaptation) you will get used to this behaviour and quite likely will love it (yes, this means changing working habits a bit, which is quite hard to do (requires time) for some people/in some cases).
Anyway ... to enable "save single file" functionality:
Settings | Keymap
On that screen, in search box type "save"
The action you are after is called "Other | Save Document"
Assign whatever shortcut you want.
P.S.
This action will NOT ask for confirmation (same behaviour as standard save does).
P.P.S.
This action is available since PhpStorm v7 ONLY.

Is it possible to have same resource names (for resw) in different directories?

Normally, when you read about localization resources (RESW) for a universal application you are asked to create a single resource file for each language with Resource.resw name or in a most advanced scenario they advice to create two or three like Errors.resw, Messages.resw and that's about it. We have completely different approach (let's don't argue upon this, for us it proved to be good). We have a separate RESW file matching a CS file where we have resources which needs to be localized. We mimic the same folder structure in the Resource(language)\ folders as we have in the source code. The whole pattern came from Windows Phone Silverlight application and worked perfect with RESX. I have concerns regarding this in universal app. The problem is that even though a RESW file is located deep in the directory structure like
Res\it\Controls\Browser\MusicDetails.resw
it is referred as if it is located in the language root at Res\it. For example to get this resource in the code the code would look like this
resourceLoader = ResourceLoader.GetForCurrentView(currentAssemblyName + "/MusicDetails");
resourceLoader.GetString("Title");
Getting back to windows phone silverlight app the path in a similar case looks like "\Controls\Browser\MusicDetails.resw" and it is definitely not an issue for the RESX resources.
Is there something we are missing or it is a hard RESW limitation and all RESW files no matter where they are located in the directory structure are treated as if they are at the root of the language directory? I foresee a problem if in the future we have exactly the same RESW name in different directory branches. How to work around this?
I think is not possible to do that, I tried to do something like you before with Windows 8.1 and it was not possible now with UWP is the same we need follow the guidelines here
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965328.aspx
I did this steps and it works like a charm.
UWP apps have restrictions they are not like traditional apps (Win32 apps)

Scan directory for file names in MVC

I'm developing a MVC5 web app, hosted through azure, that lets you manage your movies (it's just for myself at the moment). I'm trying to find a way to scan a local folder on the users pc for a list of file names. I do realise the security/permissions issues I might run into. I do not need the file uploaded, only the full file name.
It would work by the user being able to select a folder where they store their movies and it will take in all the file names, including the ones in any sub directories.
I tried a multiple file upload form but quickly ran into issues with the max request limit which I tried messing around with but it proved redundant in the end. I can settle for the user selecting multiple files but would rather it done the directory way.
I know this might prove impossible in the end but any help would be greatly appreciated.

how can I open a sqlite file in ios for reading without copying to documents?

I got an app I'm working on that uses static data from a sqlite database to do various things, While I only need read only access to the database, depending on the episode they pick from the first screen I want it to use a different database file and I want the list of available episodes to be updateable on the fly. and I got help to get the list of available episodes updated, and the proper content downloaded and stored in separate folders, So I know I could when the episode is selected delete the sql file in the documents folder and copy in the new one each time and that would work well enough for what I'm trying to do. but it seems like a bit much extra work to have to check for file, delete file, copy in new one. then open it from there each time the user wants to pick a different episode. and I don't want to put all the sql files together as that will be a bigger hassle then the first route especially if this app stays around long enough to have a long list of episodes.
so my question here is: can I get at least read-only access to an sql file that I've downloaded (or one in the bundle for testing) with out having to first copy it to the documents? and if so how would i open the file?
Can I get at least read-only access to an SQL file that I've downloaded (or one in the bundle for testing) without having to first copy it to the documents directory?
Yes. Files in the app bundle are readable (if they weren't, there would be no point in storing files in the bundle).
And if so, how would I open the file?
It's not clear what you're asking here - if you want to perform SQL queries on the file, you should use the sqlite3 library which is available on iOS.

How to migrate my files from one folder location to another with full user visibility

For years I've put my application data files in c:\MyCompany\MyDataFileFolder\App where 'App' is my application name. I made this choice in the early days of Wild-West-Windows when Microsoft seemed to keep changing its own mind (My Documents, Documents, Program Data etc). As I've learnt more about how to do things correctly, and as Windows has now 'settled down' and is more picky about permissions I'd like to move my files. Users have got used to where they are though, and what I'd really like to do is to implement something like Windows does with 'special folders' where there are several synonymous names, thus in my legacy folder I'd like to put something in (or change a folder to) an alias for the real location which will now be something descended from Program Data. This way, the files are in a good place with the correct permissions and if we run a utility expecting or modifying files in the 'old' place this gets changed transparently to the 'new' place (thus a simple shortcut wont work).
Is this possible? Is there are recognised technique for this? I'm using Delphi XE2.
What you are looking for is either a Symbolic Link or a Reparse Point.

Resources