Keyboard Ninja: Toggle File Extension Display With a Shortcut Key in Windows Bàn phím Ninja: Toggle File Extension Hiển thị Với một khóa tắt trong Windows
Have you ever wanted to be able to easily toggle the visibility of file extensions? Bạn đã bao giờ muốn để có thể dễ dàng bật / tắt khả năng hiển thị của các phần mở rộng file? We've shown you Chúng tôi đã thể hiện bạn how to toggle hidden files làm thế nào để chuyển các tập tin ẩn before, and now we've come up with a similar solution for file extensions. trước, và bây giờ chúng tôi đã tìm ra một giải pháp tương tự cho phần mở rộng tập tin.
If hotkeys are your game, be sure and check out Nếu phím nóng là trò chơi của bạn, hãy chắc chắn và kiểm tra our 21 keyboard shortcut articles 21 bàn phím tắt bài viết của chúng tôi . .
Toggle File Extensions Toggle File Phần mở rộng
Once you've downloaded and run the application, all you need to do is hit the Win+Y shortcut key while you have any folder open: Một khi bạn đã tải về và chạy ứng dụng, tất cả những gì bạn cần làm là nhấn phím tắt Win + Y, trong khi bạn có bất kỳ thư mục mở:

And you'll immediately see the file extensions, or won't see them – the point is that it will toggle between the two settings. Và ngay lập tức bạn sẽ thấy phần mở rộng tập tin, hoặc sẽ không thấy chúng - điểm là nó sẽ chuyển giữa hai thiết lập.

Using the same hotkey sequence you can bring the file extensions back. Sử dụng dãy phím nóng cùng bạn có thể mang lại cho các phần mở rộng tập trở lại.
Installing the Hotkey Cài đặt Hotkey
To make this run at startup, you have to save and extract the downloadable file, and then create a shortcut in your startup folder, which can be accessed by putting the following into the location bar: Để làm điều này chạy lúc khởi động, bạn phải lưu và giải nén file tải về, và sau đó tạo ra một shortcut trong thư mục khởi động của bạn, có thể được truy cập bằng cách sau đây vào thanh địa điểm:
shell:startup vỏ: khởi động
You'll notice the ToggleFileExt item that I added into the startup folder. Bạn sẽ nhận thấy mục ToggleFileExt mà tôi được gửi vào thư mục khởi động.

There's no UI for this application, and it'll run completely in the background with fairly low memory usage. Không có giao diện người dùng cho ứng dụng này, và nó sẽ chạy hoàn toàn trong nền với sử dụng bộ nhớ khá thấp.

Using the AutoHotkey Version Sử dụng Phiên bản AutoHotkey
If you are already an AutoHotkey user and would like to just add this to your current script, the full source code is here: Nếu bạn đã là người dùng AutoHotkey và muốn chỉ cần thêm đoạn mã này để hiện tại của bạn, mã nguồn đầy đủ là đây:
; WINDOWS KEY + Y TOGGLES FILE EXTENSIONS ; WINDOWS KEY + Y Toggles file extensions
#y:: # y::
RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced, HideFileExt
If HiddenFiles_Status = 1 Nếu HiddenFiles_Status = 1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 0 RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced, HideFileExt, 0
Else Khác
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 1 RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced, HideFileExt, 1
WinGetClass, eh_Class,A WinGetClass, eh_Class, A
If (eh_Class = “#32770″ OR A_OSVersion = “WIN_VISTA”) Nếu (eh_Class = "# 32.770" HOẶC A_OSVersion = "WIN_VISTA")
send, {F5} gửi, (F5)
Else PostMessage, 0×111, 28931,,, A Else PostMessage, 0 × 111, 28.931,,, A
Return Quay trở lại
Note: If the script doesn't work for you, you can Lưu ý: Nếu kịch bản không làm việc cho bạn, bạn có thể grab a text version here lấy một phiên bản văn bản ở đây . .
This isn't the type of utility that I would end up using all the time, but it works great as part of my regular AutoHotkey toolkit. Đây không phải là loại tiện ích mà tôi sẽ kết thúc bằng cách sử dụng tất cả thời gian, nhưng nó hoạt động tốt như một phần của bộ công cụ AutoHotkey thường của tôi.
Download ToggleFileExt Hotkey Application Tải về ToggleFileExt Hotkey ứng dụng

Daily Email Updates Email cập nhật hàng ngày
You can get our how-to articles in your inbox each day for free. Bạn có thể làm thế nào chúng tôi vào các bài viết trong hộp thư của bạn mỗi ngày miễn phí. Just enter your name and email below: Chỉ cần nhập tên và email của bạn dưới đây:



AHK script won´t work, whines about unicode or something. AHK script sẽ không hoạt động, whines về unicode hoặc cái gì đó. Can you put it to textsnip (that worked for the previous script)? Bạn có thể đặt nó vào textsnip (mà làm việc cho các kịch bản trước)?
I put it to textsnap to view it as a plain text, but the script still gives this error: Error at line 55. Tôi đặt nó vào textsnap để xem nó như là một văn bản đồng bằng, nhưng kịch bản vẫn cung cấp cho lỗi này: Lỗi tại dòng 55. Line Text: (eh_Class = “#32770″ OR A_OSVERSION= “WIN_VISTA”) Error: Missing “)” Đường dây Text: (eh_Class = "# 32.770" HOẶC A_OSVERSION = "WIN_VISTA") Lỗi: Thiếu ")"
What to do? Làm gì?
@ville: @ ville:
I uploaded a text version, linked in the article now. Tôi đã tải lên một phiên bản văn bản, liên kết trong bài viết bây giờ.
The quote after the #32770 is a unicode closing quote. Các báo giá sau khi # 32.770 là một báo đóng unicode. I was using PSPad to edit it and couldn't figure out why it continued to highlight “OR A_OSVERSION=” as quoted text until I got the error. Tôi đã sử dụng PSPad để chỉnh sửa nó và không thể tìm ra lý do tại sao nó vẫn tiếp tục để làm nổi bật "hoặc A_OSVERSION =" như nội dung trích dẫn cho đến khi tôi nhận lỗi. That's when I figured it out. Đó là khi tôi figured it out. If you paste the text into your editor and then delete and retype that quote, you'll have a script that doesn't blow up, though it still won't actually work. Nếu bạn dán vào trình soạn thảo văn bản của bạn và sau đó xóa và nhập lại mà báo giá, bạn sẽ có một kịch bản mà không thổi lên, mặc dù nó vẫn sẽ không thực sự làm việc.
The second more insidious problem is that the “x” in “PostMessage, 0×111″ is actually a multiplication symbol. Vấn đề thứ hai hơn insidious là x "" ở "PostMessage, 0 × 111" thực sự là một biểu tượng phép nhân. It doesn't generate an AutoHotkey error, but it also doesn't refresh Windows Explorer properly. Nó không tạo ra một lỗi AutoHotkey, nhưng nó cũng không làm mới Windows Explorer đúng. Change that to an honest-to-goodness lowercase letter “x”, and you'll actually be able to run the code and get what you want. Thay đổi đó đến một cách trung thực-to-goodness chữ thường chữ "x", và bạn thực sự sẽ có thể chạy mã và có được những gì bạn muốn. By the way, I find [Win] + [.] to be an intuitive shortcut for this piece of code. By the way, tôi tìm thấy [Win] + [.] Là một phím tắt trực quan cho mảnh mã.
Geek, I'd recommend updating the HTML to fix these little glitches and then folks can cut and paste that code. Geek, tôi khuyên bạn nên cập nhật HTML để sửa chữa những ổn folks ít và sau đó có thể cắt và dán mã. Thanks for another great tweak! Cảm ơn bạn khác chỉnh tuyệt vời!
Todd Corson Todd Corson
@oddacorn: @ oddacorn:
Sorry about that, WordPress does awful things with code. Xin lỗi về điều đó, WordPress không những điều khủng khiếp với mã. Very irritating. Rất khó chịu.
It would be useful if it was a Registry addition rather than an auto-startupTSR. Nên nếu nó đã là một bổ sung Registry hơn là tự động startupTSR.