How to overwrite a read only file in windows?

Posted on 2009-02-18
Last Modified: 2013-11-09
How to overwrite a read only file in windows?

i do not have permission to change attribute

Question by:SmartestVEGA
    LVL 6

    Accepted Solution

    You can't w/out the proper permission
    LVL 10

    Assisted Solution

    If you don't have permission to change the attribute, then you would probably need to take ownership of the file first and you would need sufficient permissions to perform this task.  You can either use the SUBINACL command to do this in a script / command line (download from Microsoft) with:
    subinacl /file path\file.ext /grant=YourUsername=f

    Or assuming a "professional" version of Windows XP / Vista and simple-file-sharing turned off, you can right-click on the file -> Properties -> Security tab -> Advanced button -> Owner tab and set  yourself as the owner.  After you are the owner you should be able to change the READONLY attribute.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
    This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now