Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unintentional Typing Errors

17 views
Skip to first unread message

Zaidy036

unread,
Sep 19, 2020, 5:05:12 PM9/19/20
to
In the past several people have given me advice so I am posting a batch
I made to reduce unintentional typing errors. The errors were caused by
inattention when having several items open in my text editor(Notepad++)
and command windows on my Windows PC.

The batch toggles on/off the Read Only attribute(R). Install the batch
in a convenient location, make a shortcut to it, and add the shortcut to
your SendTO folder. Test by opening Windows Explorer, select one or more
files, right click, select SendTo, and then your new shortcut. While you
may select any reasonable number of files Windows does limit the action
to 9 files at once. F:\_ATTRIB.TXT is a temp file and may be changed to
any .txt file you find convenient. This takes immediate effect in
Notepad++ without closing open files first so I reduce accidental typing
errors by making files read only except when actually trying to modify them.

:: _ReadAttribChange.bat
:: Toggles file Attribute r on/off
:: Use Right Click SendTo menu
:: Limit is 9 files at once
ECHO OFF
FOR %%F IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO (
FOR %%I IN (%%F) DO ECHO %%~AI > F:\_ATTRIB.TXT
FINDSTR r F:\_ATTRIB.TXT && ATTRIB -R %%F || ATTRIB +R %%F
)
DEL F:\_ATTRIB.TXT
EXIT
0 new messages