Computer >> Máy Tính >  >> Hệ thống >> Windows

Cách sao lưu và khôi phục cài đặt Chế độ xem thư mục trong Windows 11/10

Windows File Explorer rất dễ điều hướng và đi kèm với rất nhiều tính năng trợ năng thú vị, một trong số đó là cài đặt chế độ xem thư mục. Bạn có thể tùy chỉnh các thư mục để đại diện cho loại tệp mà chúng lưu trữ.

Ví dụ:nếu bạn có một thư mục chỉ lưu video, bạn có thể đặt thư mục để hiển thị hình thu nhỏ 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ị các biểu tượng vừa, lớn hoặc cực lớn.

Sau khi thực hiện những thay đổi này, bạn có thể muốn sao lưu chúng để khôi phục cài đặt chế độ xem thư mục nếu chúng được đặt lại. Hướng dẫn này chỉ cho bạn cách sao lưu và khôi phục cài đặt chế độ xem thư mục của bạn bằng cách sử dụng tệp hàng loạt.

Sao lưu và khôi phục cài đặt Chế độ xem thư mục trong Windows 11/10

Làm theo các bước bên dưới để sao lưu và khôi phục cài đặt Chế độ xem thư mục của bạn trong Windows 11/10.

  1. Tạo tệp hàng loạt sao lưu và khôi phục.
  2. Bỏ chặn tệp .bat nếu bị Windows chặn.
  3. Chạy tệp .bat để sao lưu và khôi phục cài đặt chế độ xem thư mục của bạn.

Không cần giải thích gì thêm, bây giờ chúng ta sẽ chuyển ngay sang các bước chi tiết liên quan đến việc thực hiện các hoạt động trên.

1] Tạo tệp hàng loạt sao lưu và khôi phục

Cách sao lưu và khôi phục cài đặt Chế độ xem thư mục trong Windows 11/10

Nhấp vào Bắt đầu và tìm kiếm Notepad . Chọn ứng dụng Notepad từ kết quả tìm kiếm để khởi chạy nó.

Nhập văn bản sau vào tệp 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 tệp trên màn hình của bạn với .bat sự mở rộng. Thực hiện việc này bằng cách thêm .bat ở cuối tên tệp trước khi nhấn Lưu nút.

Cách sao lưu và khôi phục cài đặt Chế độ xem thư mục trong Windows 11/10

Các tệp được lưu trong phần mở rộng .bat là các tệp hàng loạt và khi được thực hiện đúng cách, chúng sẽ cho phép bạn chạy các lệnh trên hệ thống Windows của mình. Tìm hiểu thêm về các tệp hàng loạt và khám phá các thủ thuật thú vị này.

2] Bỏ chặn tệp .bat

Sau khi lưu thành công tệp mới tạo dưới dạng .bat tệp, Windows có thể chặn nó. Để chạy tệp này, trước tiên bạn cần bỏ chặn nó. Để thực hiện việc này, hãy nhấp chuột phải vào tệp và chọn Thuộc tính từ menu ngữ cảnh.

Chuyển sang Chung của cửa sổ Thuộc tính và tìm nút Bỏ chặn hộp kiểm ở cuối cửa sổ. Chọn hộp này và nhấn OK để bỏ chặn tệp hàng loạt.

LƯU Ý: Nếu Bỏ chặn hộp kiểm bị thiếu trong thiết lập của bạn, điều đó có nghĩa là Windows không chặn tệp và bạn có thể chuyển sang bước tiếp theo.

3] Chạy tệp .bat

Sau khi bỏ chặn tệp .bat, bạn đã sẵn sàng. Bạn có thể chạy tệp .bat bằng cách nhấp đúp vào tệp. Chạy tệp loạt sẽ mở ra một cửa sổ Command Prompt hiển thị cho bạn các tùy chọn sau:

  • Sao lưu cài đặt chế độ xem thư mục của bạn.
  • Khôi phục cài đặt chế độ xem thư mục từ bản sao lưu.
  • Hủy bỏ.

Cách sao lưu và khôi phục cài đặt Chế độ xem thư mục trong Windows 11/10

Để sao lưu cài đặt chế độ xem thư mục của bạn, nhấn 1 và nhấn phím ENTER. Nếu bạn muốn khôi phục cài đặt chế độ xem thư mục của mình, hãy nhấn 2 và nhấn ENTER.

Hoặc, nhấn 3 để hủy hoạt động.

Hy vọng điều này sẽ hữu ích.

Cách sao lưu và khôi phục cài đặt Chế độ xem thư mục trong Windows 11/10