Create keyboard shortcut to make a file read only

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Pocus
Junior Member
Junior Member
Posts: 9
Joined: 2009-08-14, 05:44 UTC

Create keyboard shortcut to make a file read only

Post by *Pocus »

Is it possible to create a keyboard shortcut (e.g. Ctrl-r) to make a file
read only, or to toggle this attribute? I have not been able to do it via
Configuration, Misc., Redefine hotkeys.
User avatar
petermad
Power Member
Power Member
Posts: 16099
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

1. Click "Configuration"-> "Options..." -> "Misc."
2. In "Redifine hotkeys (Keyboard remapping)" mark Ctrl and select R.
3. Click on the magnifying glass next to "Command".
4. Go to the bottom of the list and click on usercmd.ini
5. Click on "New" and name the new command for example em_readonly
6. Fill out the dialog like this:
Command: attrib.exe +R
Parameters: %P%N
Icon file: %COMMANDER_EXE%
Icon: 2
Tooltip: Mark file readonly
Check the box "Run minimized"
7. Click "OK" three times.


Notice that Ctrl+R is TC's default key for re-reading the file panel (you can also re-read with F2 though)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Pocus
Junior Member
Junior Member
Posts: 9
Joined: 2009-08-14, 05:44 UTC

Post by *Pocus »

Not only does your solution work perfectly, but it also shows
me a powerful ability of TC I have not known about before. :D
Post Reply