Disable Auto Arrange in Windows 7.

  1. Some background follows. In Windows 7 (Windows Explorer) and 8 (File Explorer), when a file is created or moved or renamed within a folder, that file is immediately placed in its location within that folder based upon the sorting currently in effect for the folder. This process is illustrated in the three screens below.

The folder contains five files that are sorted in Name order. When the name of the first file is changed from ear.jpg to fear.jpg, then as soon as you press Enter to effect the rename, the renamed file will immediately move to the end of the list. Windows does not provide a means of disabling this automatic sorting facility, a feature commonly called Auto Arrange. In addition, you cannot drag these file icons into a new order. There is a way in which this Auto Arrange function can be partially disabled, and this process is described below beginning in step 3.

  1. Windows provides eight file views (see below). The files in the example above are in Medium Icons view. Auto arrange is in effect in all views. One consequence of this behavior is that you cannot reorder photos that are displayed in one of the first three Icons views simply by dragging and dropping them into a new position, as you could in Windows XP. If you were able to move photos into a different order, then you could pass them to the Flash Renamer program via a right click menu option and rename them after they have been reordered, locking in this order with a new file name followed by a sequential number. The installation of Flash Renamer and its right click option are described starting in step 10.


  1. This Auto Arrange feature can be partially disabled. A guru on the Windows Seven Forums site has created batch files (.bat) that perform two functions. The first disables Auto Arrange in Windows 7 Explorer and the other restores it. I have examined the files and simplified the first one. The feature has the following limitations, none hampering productivity:
  • It disables Auto Arrange only in the My Pictures folder or any of its subfolders (my only simplification).
  • It does so only when the folder is displayed as a User folder and not as a Library folder (see step 8 for an explanation).
  • It disables it only when files are displayed in any of the four Icons views or the Extended Tiles view. (In practice, the Small Icons or Extended Tiles views are almost never used.)
  • You can drag images around within the folder or into it from other folders, thus reordering images for slide shows or for any other purpose. You can rename the images in place and their order will not change, no matter what the new name is.

On rare occasions, when files outside the My Pictures folder need to be rearranged, those files may be moved temporarily into a subfolder within My Pictures, where the rearranging and renaming can be performed, and then moved back into their source folder.

Steps 4 to 8 provide detailed instructions on disabling Auto Arrange and step 9 describes how to restore Auto Arrange if this is ever desired.

Warning! These two batch files update the Registry and work only for Windows 7.

  1. Create a restore point. Go to start, right click on Computer, and click Properties. Click on the System protection link on the left (see below left). A System Properties window will appear with the System Protection tab selected. Close the System window (below left). Under Protection Settings, verify that Protection is On (below center) for your main drive (normally the C: drive)—if it is not, then do not disable Auto Arrange—something is wrong with your computer’s setup. Otherwise, click on the Create… button, enter a description for the restore point, and click Create (below right).

The window shown below left will appear. Within a minute the window shown below right will appear, indicating success. Click Close. Click OK to close the System Properties window.

  1. Create the DisableAutoArrange.bat file. The boxed code below is a script that contains the following commands that will be executed on the screen in a Command window—their case is not important (ECHO is the same as Echo or echo):

@echo off Prevents commands that are being executed from being displayed on the screen.

echo [text] Text that will be displayed on the screen, typically status information for the benefit of the user.

:: [text] A comment line in the code, facilitating code comprehension and maintenance.

reg delete [params] Command to delete the specified key in the registry.

reg add [params] Command to add the specified key in the registry.

taskkill [params] Command to terminate a task, in this case, Windows Explorer.

start [params] Command to start a program.

cls Command to clear any statements in the Command window and display only a prompt.

timeout [params] Command to pause the program for a number of seconds to await completion of a prior command.

explorer.exe [params] Command to open a Windows Explorer window and display the specified folder.

@echo off

:: Created by: Shawn Brink

:: http://www.sevenforums.com

:: Tutorial: http://www.sevenforums.com/tutorials/92758-windows-explorer-auto-arrange-disable.html

:: To reset all folders to default folder views

Reg Delete “HKCU\Software\Microsoft\Windows\Shell\BagMRU” /F

Reg Delete “HKCU\Software\Microsoft\Windows\Shell\Bags” /F

Reg Delete “HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags” /F

Reg Delete “HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU” /F

Reg Delete “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU” /F

Reg Delete “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags” /F

Reg Delete “HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\Bags” /F

Reg Delete “HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\BagMRU” /F

:: To kill and restart explorer

taskkill /f /im explorer.exe

start explorer.exe

CLS

echo.

echo.

echo Please wait for explorer to restart. No need to do anything.

echo.

TIMEOUT 10

:: To open the Computer window

explorer.exe shell:MyComputerFolder

:: Disable Auto Arrange for Pictures folder template

REG ADD “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}” /V FFLAGS /T REG_dWORD /D 1124073476 /F

REG ADD “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}” /V LogicalViewMode /T REG_dWORD /D 1 /F

REG ADD “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}” /V Mode /T REG_DWORD /D 4 /F

Select the text in the box above, open a Notepad window (go to start Notepad or start All Programs Accessories Notepad), and copy the text into that Notepad window. Verify that the first line is the @echo off line and the last line is the REG ADD line ending in /V Mode /T REG_DWORD /D 4 /F.

In Notepad, go to File Save As, select Desktop in the left panel, set File name to DisableAutoArrange.bat, and set Save as type to All Files (*.*). Click Save. See below.

  1. Be aware that the next step changes the Registry.

Microsoft states:

What is the registry?

The registry is a database in Windows that contains important information about system hardware, installed programs and settings, and profiles of each of the user accounts on your computer. Windows continually refers to the information in the registry.

You should not need to make manual changes to the registry because programs and applications typically make all the necessary changes automatically. An incorrect change to your computer’s registry could render your computer inoperable. However, if a corrupt file appears in the registry, you might be required to make changes.

We strongly recommend that you back up the registry before making any changes and that you only change values in the registry that you understand or have been instructed to change by a source you trust.

  1. Run the DisableAutoArrange.bat file you just created. Close all windows and then double click on the DisableAutoArrange.bat file on the Desktop. A Command window (below left) will appear, displaying comments and selected commands as they are executed. The entire process takes only a bit over ten seconds, given that one of the commands is TIMEOUT 10. At the end, the Command window closes and a Windows Explorer window (same result as start Computer) will open (below right). Delete the DisableAutoArrange.bat file on the Desktop. Close the Explorer window, which was opened only to illustrate the completion of the execution of the batch file.

  1. Understand the feature that you have installed.

There are two important aspects of the feature. You need to know in which views and folders it applies, and the effects of two settings you can change.

  • Views and Folders. Auto arrange has been disabled for only the five views identified below (left). In these views, you can arrange files and folders in any random order and position. When one of these views has been selected for a My Pictures folder, two extra settings—Auto arrange and Align to grid—will appear on the View menu item. (To make View temporarily visible, press the Alt key to reveal the Menu bar; to make it permanently visible, go to Organize Layout and check Menu bar.)

This Auto arrange setting does not mean that if checked, it re-enables the feature you have just disabled. Instead, it means “after I move an item to a new position, keep all items together without any white space between them.”

These two settings are grayed out for the other three views; see Warning immediately below if the two items do not appear at all. The default setting for folders in the five views is shown below right—Align to grid is checked and Auto arrange is not.

Warning: These two options will not appear if the My Pictures folder is being displayed as a Library folder. If this happens, locate the same folder in the left Explorer panel under your user name:

GOOD

BAD

  • Two changeable settings. You can manually check or uncheck Align to grid and Auto arrange. The settings apply to the currently selected folder and do not propagate to subfolders. The table below describes desirability and the effects of these four possible settings. They are illustrated using a folder containing the five items shown in the table above in Medium Icons view. A “grid” is an imaginary table of cells with the same height and width as each of the icons, so that when you drag an icon to a new location, it will snap to the nearest cell in the grid if Align to grid is selected.

Settings

(My Assessment) Effect when ear is moved beyond eggs

Illustration

Auto arrange

Align to grid

(Useless) Blank space may appear between items; items are not forced into a grid.

Auto arrange

Align to grid

(Possibly useful, but ultimately I would want to select Auto arrange) Blank space may appear between items; items remain in a grid. If first item is moved, then then the first block of items to its right shift left together to refill the first item’s position.

  • Auto arrange

? Align to grid

(Best setting; for clarity, I would check both options) No blank space ever appears; items remain in a grid. Warning: If you set Auto Arrange after you have reordered file names, it will cause they to be resorted.

Because the best setting is not the default setting, when you do need to rearrange items in a folder, you should go to View and check both Auto arrange and Align to grid before you starting rearranging.

To rename a group of rearranged items, you must first install Flash Renamer (see step 10) along with its right click function (see step 14) to enable the sending of a selected set of files to the program for renaming. The second example in step 15 illustrates the renaming of the five files described above after they have been placed in the order below:


  1. (optional) Restore Auto Arrange. Do this only if you are uncomfortable with some aspect of disabling Auto Arrange. (I suspect you will never have to perform this step.) To do so, you will run the following batch file, whose 22 lines are exactly the same as the first 22 lines of the first batch file. Detailed instructions are below.

@echo off

:: Created by: Shawn Brink

:: http://www.sevenforums.com

:: Tutorial: http://www.sevenforums.com/tutorials/92758-windows-explorer-auto-arrange-disable.html

:: To reset all folders to default folder views

Reg Delete “HKCU\Software\Microsoft\Windows\Shell\BagMRU” /F

Reg Delete “HKCU\Software\Microsoft\Windows\Shell\Bags” /F

Reg Delete “HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags” /F

Reg Delete “HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU” /F

Reg Delete “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU” /F

Reg Delete “HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags” /F

Reg Delete “HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\Bags” /F

Reg Delete “HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\BagMRU” /F

:: To kill and restart explorer

taskkill /f /im explorer.exe

start explorer.exe

Select the text in the box above, open a Notepad window (go to start Notepad or start All Programs Accessories Notepad), and copy the text into that Notepad window. Verify that the first line is the @echo off line and the last line is the start explorer.exe line.

In Notepad, go to File Save As, select Desktop in the left panel, set File name to EnableAutoArrange.bat, and set Save as type to All Files (*.*). Click Save. See below.

Run the EnableAutoArrange.bat file you just created. Close all windows and then double click on the EnableAutoArrange.bat file on the Desktop. A Command window will appear very briefly and then disappear. Then a Windows Explorer window (same result as start Computer) will open. Delete the DisableAutoArrange.bat file on the Desktop. Close the Explorer window, which was opened only to illustrate the completion of the execution of the batch file.

Part VIII: Install Flash Renamer. [This section is optional but the actions taken above depend on its installation.]

Note: This part includes the installation of Flash Renamer along with a right click function enabling a file selection to be renamed in other than file name order, provided Auto Arrange has been implemented (see Part VII).


  1. Install Flash Renamer (http://www.rlvision.com/downloads.asp): This is a program that facilitates file renaming. It is especially effective at renaming image files from a camera. Although it costs $19.95, I have added it as a courtesy to some installations because I feel it is essential software. It has a wide range of powerful capabilities. I describe only one of them below, but it’s the one of greatest value to users. The version described below is Flash Renamer 6.72.

From the link, click Download next to Flash Renamer and then Run. A wizard will appear; accept the defaults. If later a new version becomes available, it should be downloaded and installed; it will automatically replace your older version and if the older version had been registered, that registration will be carried forward to the new version.

The first time you run the program, the following screen will appear. Click Close.

  1. With the unregistered version, the number of free file renames you may perform is limited. To purchase Flash Renamer, start the program, and in the UNREGISTERED COPY window that appears, click Register Now! and follow the prompts. As soon as you purchase the product, a product registration key such as ABCDEFGHI will be displayed on a web page. Restart Flash Renamer, and click on Enter Reg Code. Enter that value as the registration code. See below.

D:\Larry\Pictures\00 Temp\regform.jpg

  1. Pin the program to the start menu: go to start All Programs Flash Renamer Flash Renamer, right click, and select Pin to Start Menu. Click start and drag it into its alphabetical position.
  2. You can run the program in two ways. The normal way is to go to start Flash Renamer, and select the Replace tab in the left panel and the Browser tab in the right panel. A second way is to invoke it via a right click option that is installed in step 14 and for which two examples are given in step 15.

In the right panel’s text box (see below center), you enter the name of a folder, and the names of the files in that folder—typically .jpg files—are displayed. In the left panel (below left), with the Replace radio button selected, you specify the new name you wish to give the files—in this case set Find… to * [for all files] and set … and replace with: to Wedding <enum>.

When you click Rename, the file names change to Wedding 01.JPG, Wedding 02.JPG, etc. In the Ready! window that appears (below right), check Auto close and then Close, so you don’t see this window ever again. The files have been renamed as requested. If you make a mistake, press the Undo button to the right of Rename.

After Rename has been clicked, the right panel displays the new names in the Name column (see below left). If there are fewer than ten files, the <enum> generates a 1-digit number; if there are fewer than 100 files, it creates a 2-digit number, etc. These are the defaults, and my experience is that these defaults are ideal. (The file extension is not renamed; only the portion preceding it is. Thus if the 5th file were x 005.MOV, it would become Wedding 05.MOV.)

If you wish to change these defaults, then with General and the Replace tab selected, click on Counter to the right of Setup tags (below center) and the Counter Setup window (below right) will appear. Auto is checked, meaning “pad with only as many zeros as needed to keep all counters the same length”. This window specifies the meaning of the tag <counter>, used to refer to a variable component of the new file name. (I use <enum> in most places in these examples instead of <counter> because it is shorter and, although undocumented, appears to be equivalent.) Configure the Counter Setup window as desired and click Ok.

To make the file extensions lower case as well, click on the Casing tab, set Casing of Filename to No Change, set Casing of File Extension to Lower case (see below left), and click Rename. See results below right.

When you rename files in this way, the file names are always presented in the Browser tab’s window in ascending alphabetical order.

You may also set up a right click option, enabling you to select a group of file names arranged in any order and invoke Flash Renamer to rename the files without changing their order. This is discussed in the next two steps.


  1. To rename files in a different order you need to make two essential tweaks to Flash Renamer and then install a special program that enables Windows Explorer to honor the first tweak.

Implement two Flash Renamer tweaks

Go to start, right click on Flash Renamer, and select Run as administrator. Answer Yes to the UAC prompt. Click Settings at the bottom of the left Flash Renamer panel and a Flash Renamer Settings window will appear. On the left, select Shell Integration, select Show Flash Renamer menu (screen 1 below), and click OK when the warning message appears (screen 2). On the left, select Advanced, scroll down in the list of Advanced Tweaks to Auto Sort Command Line Files. If the Value is not 0, change it to 0, click Set (screen 3), and then click Ok. Close Flash Renamer to ensure the settings you made take effect.

Install the “WOW64 (32-bit) menu” item to the File Explorer right click list

This action enables you to select a group of file names that have been sorted in any order—even a list that is subset of files within a folder—and pass that list to Flash Renamer for renaming, and Flash Renamer will not alter the sort order as it renames the files. For some users, this may become the preferred way to invoke Flash Renamer.

Background: To invoke Flash Renamer from right clicking on file names within File Explorer, you must be running the 32-bit version of File Explorer. Since all computers sold today are 64-bit machines, the default version of File Explorer on these machines is the 64-bit version. (The “C:\windows\syswow64\explorer.exe /separate” command will start the 32-bit version of File Explorer within a 64-bit system, but this is an awkward step to take.) Thus what you are doing here is adding to the right click list an invocation of a 32-bit menu, which includes Flash Renamer and nine invocation options, one of which may be used to display the selected file names with their order unchanged, ready for renaming. This add-on is supplied free from the website www.gasanov.net, which includes several other useful Windows tools.

Go to http://www.gasanov.net/WOW64Menu.asp and click on WOW64MenuSetup.zip at the bottom of the page. When the window below left appears, click on Open. Click on Open at the bottom of the Internet Explorer window. When a Windows Explorer window opens, click on WOW64Menu.msi (see below right). Click Run and when the WOW64Menu window opens, click on Next, Next, and Next. Installation will begin. Respond Yes to the UAC prompt and then click Close. The installation is complete.


  1. Two examples follow to illustrate invoking Flash Renamer the second way, via a right click menu selection.

In this first example, we use the 14 Wedding photos from above but sort them by Size in File Explorer. The names are no longer in ascending order (see below). We intend to rename them, maintaining this order, to “Special Event <enum>”.

Select them all and right click on the first file in the list. A menu will appear (below left). Select the WOW64 (32-bit) Menu item and a second menu is revealed (below center) that includes Flash Renamer. Click on Flash Renamer and a third menu appears (below right). Although nine options are available, only one is appropriate for this use. Click on Start & load selected files.

Flash Renamer will start with the same panels you are accustomed to seeing except that on the right the Free Select tab will appear. In the left panel, on the Browser tab, specify the source as all files (“*”) and the new name as “Special Event <enum>” (below left). The Preview column will display the new names in the right panel (below center). Click Rename. The names will be changed (below right).

The files have been renamed in sequence while remaining sorted in Size order (see below).

Warning: When selecting more than one file for renaming, you must right click on the first file name in the list. If you click on another file name, that file name will appear within Flash Renamer as the first file in its list, and the files will be interpreted as a circular list, so that the one prior to the first file selected will appear last. For example, if I had right clicked on Wedding 14.jpg instead of Wedding 01.jpg, Flash Renamer would have presented me with the following Preview.

In this second example, we rename the five files presented above in steps 1 and 8. They are in a Medium Icons view, in a user’s My Pictures folder, with both the Auto arrange and Align to grid options checked. The ear.jpg file has been dragged to the end of the list so the list is not in order. The names will be changed from those on the left to those on the right.

To rename them, select the five items, right click on the first item of the selection, and select WOW64 (32-bit) Menu Flash Renamer Start & load selected files. In the Flash Renamer window that opens, set Find… to * and set …and replace with: to E Item <enum> and click Rename. The left panel and the before and after screens appear below, showing the renaming of the five items above with ear.jpg at the end.