Sort order when opening files

  • Thread starter Thread starter Doug Struchen
  • Start date Start date
D

Doug Struchen

When I get an open files dialog box(File..Open..), my
files are sorted by date. On another computer, they all
are sorted by Name. How do I get the Open dialog box to
always sort by Name as default? This happens in all
applications whether it be psp, or excel, or anything.
 
Right click on the empty space in the file->open window where it lists the
files/folders. This should bring up a menu with an option called "arrange
icons by" that lets you choose how to sort the folders/files.
 
Thanks - I'd like it to stay sorted by name every time.
It seems like everytime I open a file - it's defaulted to
show arranged by date.
 
Dear Sharon,

In my extensive tests of this I have to say this does absolutely nothing in XP. There is no difference between closing and ctrl + closing. You can use regmon to confirm what I say.

The system default sort order is stored in the shellstate value. This does not store icon type which is why sorting can change but one can't force detail view in a file open dialog. I'll include a definition for the entries at the end of this post.

There is a second KB article slightly newer than this one that reccommends you do something to the shellstate key (life too short to waste time looking it up in the KB). I think it says to edit it, if so that may not work on XP as XP has a bigger shellstate structure than 98. But as these structures were released as part of the settlement with the government for unethical practices by MS only the XP one was released. It was secret for 98.

Deleting the key causes it to be made again. Having not had the problem I don't know if explorer needs to be crashed or not.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer

typedef struct {
BOOL fShowAllObjects:1;
BOOL fShowExtensions:1;
BOOL fNoConfirmRecycle:1;
BOOL fShowSysFiles:1;
BOOL fShowCompColor:1;
BOOL fDoubleClickInWebView:1;
BOOL fDesktopHTML:1;
BOOL fWin95Classic:1;
BOOL fDontPrettyPath:1;
BOOL fShowAttribCol:1;
BOOL fMapNetDrvBtn:1;
BOOL fShowInfoTip:1;
BOOL fHideIcons:1;
BOOL fWebView:1;
BOOL fFilter:1;
BOOL fShowSuperHidden:1;
BOOL fNoNetCrawling:1;
DWORD dwWin95Unused;
UINT uWin95Unused;
LONG lParamSort;
int iSortDirection;
UINT version;
UINT uNotUsed;
BOOL fSepProcess:1;
BOOL fStartPanelOn:1;
BOOL fShowStartPage:1;
UINT fSpareFlags:13;
} SHELLSTATE, *LPSHSHELLSTATE;
Members

fShowAllObjects
TRUE to show all objects, including hidden files and folders. FALSE to hide hidden files and folders.
fShowExtensions
TRUE to show file extensions, FALSE to hide them.
fNoConfirmRecycle
TRUE to show no confirmation dialog box when deleting items to the Recycle Bin, FALSE to display the confirmation dialog box.
fShowSysFiles
TRUE to show system files, FALSE to hide them.
fShowCompColor
TRUE to show encrypted or compressed NTFS files in color.
fDoubleClickInWebView
TRUE to require a double-click to open an item when in Web View.
fDesktopHTML
TRUE to use Active Desktop, FALSE otherwise.
fWin95Classic
TRUE to enforce Microsoft® Windows® 95 Shell behavior and restrictions.
fDontPrettyPath
TRUE to prevent the conversion of the path to all lowercase characters.
fShowAttribCol
Not used.
fMapNetDrvBtn
TRUE to display a Map Network Drive button.
fShowInfoTip
TRUE to show a pop-up description for folders and files.
fHideIcons
TRUE to hide desktop icons, FALSE to show them.
fWebView
TRUE to display as a Web View.
fFilter
Not used.
fShowSuperHidden
TRUE to show operating system files.
fNoNetCrawling
TRUE to disable automatic searching for network folders and printers.
dwWin95Unused
Not used.
uWin95Unused
Not used.
lParamSort
The column to sort by.
iSortDirection
Alphabetic sort direction for the column specified by lParamSort. Use 1 for an ascending sort, -1 for a descending sort.
version
Not used.
uNotUsed
Not used.
fSepProcess
TRUE to launch folder windows in separate processes, FALSE to launch in the same process.
fStartPanelOn
Windows XP only: TRUE to use the Windows XP-style Start menu, FALSE to use the classic Start menu.
fShowStartPage
Not used.
fSpareFlags
Not used.
 
PS

If this key becomes damaged then folder settings won't be saved. This is the second cause of some folder settings not being saved. This is when some of the settings are saved and some aren't. I can't remember which get saved - it will save the sort but not icon style or vice versa. Deleting the key fixes that. There is no need to restart explorer.
 
In my extensive tests of this I have to say this does absolutely nothing in XP. There is no difference between closing and ctrl + closing. You can use regmon to confirm what I say.

Thanks for the reminder about that, David.

File> Close can be used to close Explorer instead.
 
This does not store icon type which is why sorting can change but one can't force detail view in a file open dialog.

PS: The OP isn't trying trying to force detail view. They need their sort
order restored.

PPS: Glad to see you back in the groups (at least in the ones that I have
time to read). I always look forward to reading your messages and learning
from them.

Sharon F
MS MVP - Windows Shell/User
 
Back
Top