Windows 10: Reset Folder View Batch File Assistance?

Discus and support Reset Folder View Batch File Assistance? in Windows 10 Support to solve the problem; Hello, OS Name: Microsoft Windows 10 Enterprise Version: 10.0.19042 Build 19042 System Type: x64-based PC Processor: Intel(R) Core(TM) i5-6500 CPU @... Discussion in 'Windows 10 Support' started by PuddleCheese, Nov 1, 2020.

  1. Reset Folder View Batch File Assistance?


    Hello,

    OS Name: Microsoft Windows 10 Enterprise
    Version: 10.0.19042 Build 19042
    System Type: x64-based PC
    Processor: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz, 3192 Mhz, 4 Core(s), 4 Logical Processor(s)
    Platform Role: Desktop
    Windows Directory: C:\WINDOWS
    System Directory: C:\WINDOWS\system32
    Installed Physical Memory (RAM): 8.00 GB

    I have been spending time over the past few days tinkering with Windows Explorer folder view sorts of things.

    I happened upon a forum post with a .batch script posted by Brink that SHOULD default all Windows Explorer folder views to their defaults, more-or-less. Forum Thread: Reset Folder View Settings to Default in Windows 10

    I modified the formatting to something I currently prefer, but the functionality should be intact. This can be read below:
    @Echo off

    echo /F SPECIFIES A FORCE CLOSE
    echo /IM SPECIFIES AN ITEM THAT IS BEING FORCIBLY CLOSED
    echo /HKCU is HKEY_CURRENT_USER
    echo MRU is Most Recently Used

    echo.

    echo 1. RESETS THE FOLDER VIEW SETTINGS OF ALL FOLDERS

    echo.

    echo 1.1. REMOVES THE POSITIONS OF ICONS IN THE FOLDER FOR DESKTOP (WINDOWS XP)
    Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\Shell\BagMRU" /F
    Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\Shell\Bags" /F

    echo.

    echo 1.2. REMOVES FOLDER VIEW SETTINGS, WINDOW SIZE, AND POSITION (WINDOWS XP)
    Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\ShellNoRoam\Bags" /F
    Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\ShellNoRoam\BagMRU" /F

    echo.

    echo 1.3. REMOVES FOLDER VIEW SETTINGS, AND POSITIONS OF ICONS ON DESKTOP (32-BIT)(WINDOWS VISTA AND LATER)
    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

    echo.

    echo 1.4. REMOVES FOLDER VIEW SETTINGS, AND POSITIONS OF ICONS ON DESKTOP (64-BIT)(WINDOWS VISTA AND LATER)
    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

    echo.

    echo 2. RESETS "APPLY TO FOLDERS" VIEW TO DEFAULT FOR ALL FOLDER TYPES
    REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F

    echo.

    echo 3. RESETS THE SIZE OF DETAILS, NAVIGATION, AND PREVIEW PANES TO DEFAULT FOR ALL FOLDERS
    Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer" /F

    echo.

    echo 4. FORCES WINDOWS EXPLORER CLOSED AND RESTARTS IT
    taskkill /f /im explorer.exe
    start explorer.exe

    echo.

    echo Date Run: %date%%time%

    echo.

    echo 5. PAUSES THE SCRIPT AND AWAITS KEY INPUT TO CLOSE TO EXIT
    pause

    This seemed to work, at least, initially.

    However, there's a folder on the Desktop that I had configured to be a MUSIC type folder (RIGHT-CLICK/PROPERTIES/CUSTOMIZE/OPTIMIZE THIS FOLDER FOR) for testing purposes.

    I had noticed that this folder is not defaulting away from the MUSIC folder type upon running Brink's script.

    I could be mistaken (Didn't document it at the time), but the Desktop folder MIGHT have defaulted from the MUSIC folder type previously, but then stopped defaulting from the MUSIC folder type upon running this .batch script:
    @Echo off

    :: /F SPECIFIES A FORCE CLOSE
    :: /IM SPECIFIES AN ITEM THAT IS BEING FORCIBLY CLOSED

    :: APPLIES GENERAL ITEMS TYPE TO ALL FOLDERS
    REG ADD "HKCU\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" /V FolderType /T REG_SZ /D NotSpecified /F

    :: FORCES WINDOWS EXPLORER CLOSED AND RESTARTS IT
    taskkill /f /im explorer.exe
    start explorer.exe

    :: PAUSES THE SCRIPT AND AWAITS KEY INPUT TO CLOSE TO EXIT
    pause

    If I re-run this script above, it will change the folder type away from MUSIC, to GENERAL ITEMS. But the initial script posted by Brink at the top of this post no longer seems to have any bearing on folders located on the desktop.

    I have spent hours combing through info., but am unable to find what exactly the reason for this might be.

    If anyone can find out what registry items I would need to remove, or add to Brink's script to default customized folder types on the desktop to their respective defaults, that would be greatly appreciated!

    Thank you!

    :)
     
    PuddleCheese, Nov 1, 2020
    #1
  2. oily_17 Win User

    Batch Files Knowledge Base

    Don't use batch files very much but one I find useful is for creating a list of files in a directory.
    Just copy the text below into Notepad and save as Filelist.bat

    dir /a /-p /o:gen >filelist.txt

    When you run it from a folder it will create a Filelist.txt file,in the same folder, that lists all the files in that folder.Useful when you are too lazy to type all the files out yourself.
     
    oily_17, Nov 1, 2020
    #2
  3. Batch Files Knowledge Base

    Very nice and usefull thanks for contributing.
     
    AphexDreamer, Nov 1, 2020
    #3
  4. Reset Folder View Batch File Assistance?

    Batch file

    in fact when i reset a user password it is supposed to print the generated password to a printer but i don't want to print it. i want the batch file to open the .spl file generated in notepad, i note the password then on closing the notepad, the files .shd and .spl are deleted permanently from the folder
     
    Sandeep Bhugoo, Nov 1, 2020
    #4
Thema:

Reset Folder View Batch File Assistance?

Loading...
  1. Reset Folder View Batch File Assistance? - Similar Threads - Reset Folder View

  2. file view vs folder view

    in Windows 10 Gaming
    file view vs folder view: I want to change the photo default to large icons NOT FOLDER/SUBFOLDER VIEW windows 10 https://answers.microsoft.com/en-us/windows/forum/all/file-view-vs-folder-view/61f48573-9b41-4f95-9432-d17387f5eaba
  3. file view vs folder view

    in Windows 10 Software and Apps
    file view vs folder view: I want to change the photo default to large icons NOT FOLDER/SUBFOLDER VIEW windows 10 https://answers.microsoft.com/en-us/windows/forum/all/file-view-vs-folder-view/61f48573-9b41-4f95-9432-d17387f5eaba
  4. file view vs folder view

    in Windows 10 Customization
    file view vs folder view: I want to change the photo default to large icons NOT FOLDER/SUBFOLDER VIEW windows 10 https://answers.microsoft.com/en-us/windows/forum/all/file-view-vs-folder-view/61f48573-9b41-4f95-9432-d17387f5eaba
  5. Batch Files

    in Windows 10 Software and Apps
    Batch Files: How do i make it that my batch file puts itself in to startup https://answers.microsoft.com/en-us/windows/forum/all/batch-files/6156404d-20d4-4f58-bee5-14629dbf7b10
  6. File Explorer Folder view

    in Windows 10 Support
    File Explorer Folder view: Has there been a solution to the age old problem of the File Explorer Folder view randomly changing? 183414
  7. Windows updates resets folder views

    in Windows 10 Network and Sharing
    Windows updates resets folder views: Ok I'm still on 1809 its end of life and I need to update. Problem is I'm reluctant because it never retains my folder views, Always groups download folders by date easy enough to remove but scouring through folders and changing them to pictures or videos manually is going to...
  8. Create batch files with Batch?

    in Windows 10 Software and Apps
    Create batch files with Batch?: How to create Batch and VBS files with Batch? So I write a batch file which I then convert to exe that creates new folders in a certain directory and then creates batch and VBS files with a certain content and saves them in the created folder. So it's similar to a program...
  9. File Explorer folder view

    in Windows 10 Network and Sharing
    File Explorer folder view: On a working folder, my desktop File Explorer has "Add Columns" grayed out. Likewise all parent folders up to and including "Documents." If I copy that same working folder to a thumb drive, then File Explorer on the desktop reading the thumb drive WILL allow me to add...
  10. Batch Folder and Batch File/Move Software

    in Windows 10 Software and Apps
    Batch Folder and Batch File/Move Software: Looking for recommendations for software that handles automatic batch folder creation according to defined rules. Also looking for software that handles automatic file and folder moving into more than one directory according to selection criteria (size, date, extension,...