Windows File Explorer dễ điều hướng và đi kèm với nhiều tính năng truy cập thú vị, trong đó có cài đặt folder view (xem thư mục). Bạn có thể tùy chỉnh thư mục để đại diện cho loại tệp chúng lưu trữ.
Ví dụ, nếu bạn có thư mục chỉ lưu video, bạn có thể đặt thư mục hiển thị thumbnail của video thay vì danh sách hoặc chi tiết tệp. Bạn cũng có thể tùy chỉnh từng thư mục để hiển thị biểu tượng trung bình, lớn hoặc extra-large.
Sau khi thực hiện các thay đổi này, bạn có thể muốn sao lưu chúng để khôi phục cài đặt folder view nếu chúng bị reset. Hướng dẫn này chỉ cho bạn cách sao lưu và khôi phục cài đặt folder view bằng cách sử dụng file batch.
Sao lưu và khôi phục cài đặt Folder View trên Windows 11/10
Làm theo các bước dưới đây để sao lưu và khôi phục cài đặt Folder View trên Windows 11/10.
- Tạo file batch sao lưu và khôi phục.
- Bỏ chặn file .bat nếu bị Windows chặn.
- Chạy file .bat để sao lưu và khôi phục cài đặt folder view.
Không nói thêm, chúng ta sẽ đi ngay vào các bước chi tiết liên quan đến các thao tác trên.
1. Tạo file batch sao lưu và khôi phục

Nhấp vào nút Start và tìm kiếm Notepad. Chọn ứng dụng Notepad từ kết quả tìm kiếm để khởi chạy.
Nhập văn bản sau vào file Notepad mới:
@ECHO OFF title Backup and Restore Folder View Settings Tool :choice cls echo. echo OPTIONS: echo. echo 1. Back up your folder view settings. echo 2. Restore folder view settings from backup. echo 3. Cancel echo. echo. set /P c=Type the option number you would like to do, and press Enter? if /I "%c%" EQU "1" goto :verify1 if /I "%c%" EQU "2" goto :verify2 if /I "%c%" EQU "3" exit goto :choice :verify1 IF EXIST "%userprofile%\Desktop\Folder View Settings Backup" goto :response1 goto :backup :response1 echo. echo. echo You already have a "Folder View Settings Backup" folder on your desktop. echo Please move it to another location, and try again. echo. pause goto :choice :backup mkdir "%userprofile%\Desktop\Folder View Settings Backup" REG EXPORT HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_CurrentVersion_Explorer_Streams_Defaults.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\Shell\BagMRU "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_BagMRU.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\Shell\Bags "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_Bags.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_Bags.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_BagMRU.reg" /y REG EXPORT "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_BagMRU.reg" /y REG EXPORT "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_Bags.reg" /y cls echo. echo Backup of folder view settings successfully completed. echo. pause exit :verify2 IF NOT EXIST "%userprofile%\Desktop\Folder View Settings Backup" goto :response goto :restore :response echo. echo. echo You do not have a "Folder View Settings Backup" folder on your desktop. echo Please place the backup folder on your desktop, and try again. echo. pause goto :choice :restore REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F 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 IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_CurrentVersion_Explorer_Streams_Defaults.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_BagMRU.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_Bags.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_Bags.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_BagMRU.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_BagMRU.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_Bags.reg" cls echo. echo Backup of folder view settings successfully restored. echo. echo Waiting to restart explorer to apply. echo Your screen will flash as explorer is restarted. echo. echo. pause taskkill /f /im explorer.exe start explorer.exe exit
Bạn có thể sao chép và dán văn bản trên vào ghi chú. Tiếp theo, nhấn CTRL + S và lưu file trên màn hình desktop với phần mở rộng .bat. Làm điều này bằng cách thêm .bat ở cuối tên file trước khi nhấn nút Save.

Các file lưu với phần mở rộng .bat là file batch và khi làm đúng, chúng sẽ cho phép bạn chạy lệnh trên hệ thống Windows. Tìm hiểu thêm về file batch và khám phá các thủ thuật thú vị.
2. Bỏ chặn file .bat
Sau khi lưu thành công file mới tạo dưới dạng .bat, Windows có thể chặn nó. Để chạy file này, bạn cần bỏ chặn nó trước. Để làm vậy, chuột phải vào file và chọn Properties từ menu ngữ cảnh.
Chuyển sang tab General của cửa sổ Properties và tìm hộp kiểm Unblock (Bỏ chặn) ở phía dưới cửa sổ. Tích vào hộp này và nhấn nút OK để bỏ chặn file batch.
LƯU Ý: Nếu hộp kiểm Unblock bị thiếu trong cài đặt của bạn, điều đó có nghĩa là Windows không chặn file và bạn có thể chuyển sang bước tiếp theo.
3. Chạy file .bat
Sau khi bỏ chặn file .bat, bạn đã sẵn sàng. Bạn có thể chạy file .bat bằng cách double-click vào nó. Chạy file batch mở cửa sổ Command Prompt hiển thị các tùy chọn sau:
- Back up your folder view settings (Sao lưu cài đặt folder view).
- Restore folder view settings from backup (Khôi phục cài đặt folder view từ bản sao lưu).
- Cancel (Hủy).

Để sao lưu cài đặt folder view, nhấn 1 và nhấn phím ENTER. Nếu bạn muốn khôi phục cài đặt folder view, nhấn 2 và nhấn ENTER.
Thay vào đó, nhấn 3 để hủy thao tác.
Hy vọng điều này giúp ích.
