This is a common complaint by many. In fact I remember my own aunt cursing the PC loudly for doing that. It was funny but at the same time, I could feel the pain. The problem occurs due to the fact that Windows tries to "Auto-Detect" the type of folder that you are viewing. This is a great feature for most of us, where Windows tries to optimize the viewing of the folder automatically by setting to the optimum folder view. This is where the trouble starts as optimization is quite subjective and therefore you will notice Windows deciding a music folder setting in spite of their being a presence of only one or two music files among several documents.
You can never expect a machine to identify how a particular folder ought to view or is the best for you to view; this is something only you as a user can decide. Also added to the fact that artificial intelligence is still under a nascent stage and that we are dealing with Microsoft just kidding!
Getting down to the problem, it's quite an easy fix. In case, Windows still refuses to learn, jump to the software solution part at the end.
Simple method
1. To customize the particular folder in question, first choose the way you would like to view the folder such as Listing or Details views.
2. If you like to have icons also rearrange in a particular fashion such as sort by name, type, etc, now is the time to set that too.
3. On any empty white space in the folder right-click and select Customize This Folder.
4. Under the Use this folder type as template is a drop down menu where you need to select All items.
5. If you have other folders within this folder and would like those folders to follow the same settings, just remember to tick Also apply this template to all subfolders.
That's it now click OK. Now close the folder and open it again, the view settings that you want should now be remembered.
Form : http://www.techtree.com/