Как создать ярлык в Total Commander для удаления атрибута только для чтения

803
sealer30

Как создать комбинацию клавиш для Total commander, которая удалит из файла только чтение или любой другой атрибут?

1

1 ответ на вопрос

2
sealer30

Expecting you know which attribute you want to modify, the next step will be to find a shortcut to be used. You may look for Total Commander shortcuts to modify the one you don't use that often or suits you the most.

In example below I will use ctrl + P to create shortcut for removing Read Only attribute:

  1. Click "Configuration"-> "Options..." -> "Misc".
  2. In "Redifine hotkeys (Keyboard remapping)" mark Ctrl and select P.
  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_RemoveReadOnly
  6. Fill out the dialog like this:
    • Command: attrib.exe -R
    • Parameters: %P%N
    • Tooltip: Mark file readonly
    • Check the box "Run minimized"
    • Icons are optional

enter image description here
(Click image to enlarge)

-R parameter in command removes Read Only attribute, the + sign do the opposite (adding the attribute). Similar for Archive[A], System[S] and Hidden[H]

Resources:
attrib.exe function and its parameters
forum post driving this question