Skip to content

Read. toggle, or set a file's Read/Write mode in Windows.

License

Notifications You must be signed in to change notification settings

Lateralus138/rwmode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RW Mode

Logo 1

Read, toggle, or set a file's Read/Write mode in Windows.


About

All about this program and project.

Description

What is this?

This is a console tool for the Windows command line environment that allows you to read, toggle, or set a file's Read/Write mode in Windows.

Motivation

Why did I write this?

I often change the read/write state of file's in Windows; for example I keep my hosts file set to Read Only, but change it to Writeable when I update and compress to my custom hosts file.

Where To Get

Download or build.

You can fork this repository and build yourself or you can download it at the current Releases page.

You can (as with any of my projects) fork and build this project yourself in keeping with the provided LICENSE below.


Usage

Where and how to use this program.

Environment and Information

Where do I use this?

Like any cli tool (or any executable for that matter) this can be used in any available command line program/emulator in Windows like CMD or PowerShell, for example, and should work in most available terminals.

Like any portable program in this can either be placed somewhere in your %PATH% and if not then when your run it you'll need to provide the direct path of the executable.

Example Given

     > & 'C:\Users\<USERNAME>\Bin\rwmode.exe' /? 
  

Examples

Best methods.

This is best used as a scheduled task via Task Scheduler with the [/P] switch, but you can use it from the command line, shortcut (.lnk), clicked, or from any other program.

Get Help.

In CMD or PowerShell. (with /?, /H, or /HELP). You can also find a screenshot below.

    C:\Windows\System32> rwmode /?
    
┌────────────────────────────────────────────────┐
│                    RW Mode                     │
├────────────────────────────────────────────────┤
│ Read, toggle, or set the ReaRW Moderite mode of a  │
│ file in Windows.                               │
├────────────────────────────────────────────────┤
│ rwmode [/H] [/F FILE] [/T] [/R] [/W] FILE      │
├────────────────────────────────────────────────┤
│ /h,/HELP,/?     This help screen.              │
│ /f,/FILE        Path to the file. This switch  │
│                 is not necessary as the path   │
│                 can be passed as a normal      │
│                 argument.                      │
│ /t,/TOGGLE      Toggle a file's R/W mode.      │
│ /r,/READ        Set a file to Read Only.       │
│ /w,/WRITE       Set a file to Writeable.       │
├────────────────────────────────────────────────┤
│ © 2022 Ian Pride - New Pride Software/Services │
└────────────────────────────────────────────────┘
    
  
CMD/PowerShell Examples.

Get Read/Write state of the Windows hosts file.

  
  C:\Windows\System32> rwmode /f C:\Windows\System32\drivers\etc\hosts
  
     "C:\\Windows\\System32\\drivers\\etc\\hosts" is currently: [Read Only].                
  
  
  

Toggle Read/Write state of the Windows hosts file.

  
  C:\Windows\System32> rwmode /f C:\Windows\System32\drivers\etc\hosts /t
  
    "C:\\Windows\\System32\\drivers\\etc\\hosts" is currently: [Read Only].
    Attempting to toggle the Read/Write mode of "C:\\Windows\\System32\\drivers\\etc\\hosts"
    "C:\\Windows\\System32\\drivers\\etc\\hosts" is currently: [Writeable].               
  
  
  

MD5 Information

This information is generated in a GitHub Action immediately after the successful build of this project.

Current X86 MD5

X86 MD5

Current X64 MD5

X64 MD5


Media

Logo, the icon for this program. logo2 logo2
Help, screenshot of the help screen. logo2 helpscreen

License Info

License Excerpt
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Support Me If You Like

If you like this project and care to donate to my PayPal:

PayPal Donation

Or Buy Me A Coffee if your prefer:

Buy Me A Coffee

About

Read. toggle, or set a file's Read/Write mode in Windows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages