How to remove "System File" attribute from a file without command prompt?
Solution 1
If you want something you can do from the context menu, here's one way that might save you some time if you're trying to do this a lot:
Create a batch file RemoveSysAttrib.bat
@echo off
attrib -s "%1%"
Then follow this guide for adding a custom app to the context menu: How to Add Any Application to the Windows Desktop Right-Click Menu
You could then have a menu item called "Remove system attribute" which does just that, using your batch file. This way, you could also create a script to add the attribute back. Might be a bit fiddly getting it to work for multiple file selections, but with a bit of luck it will launch your file once for each selected item. You'll want to test this with:
@echo off
echo %1%
pause
If it supplies the file names as attribute 1, 2, 3, etc you'll have to loop over all parameters. If more than one parameter is supplied, you could invoke your script recursively like this:
if NOT "%2%"=="" (
for %%A in (%*) do (
RemoveSysAttrib.bat "%%A"
)
) else (
attrib -s "%1%"
)
Hope that helps =)
In response to Synetech's comments:
When you use
attrib
, it won’t change theH
orS
settings if the other is set (it will say not resetting XXXX file). You would need to strip (or set) both, then change the one that you did not want to modify back to what it was before.
I extended the script to check the 'H' attribute reported by Windows 7's attrib
command. To make it more generic, you would need to check more substring positions, as I have a hunch that it's different in other versions. I don't have other versions of Windows handy right now, so I can't check.
@echo off
setlocal enabledelayedexpansion
:: Check if file is hidden - works on Windows 7
set hidden=0
for /f "delims=" %%A in ('attrib "%1%"') do (
set attr=%%A
if "!attr:~4,1!"=="H" set hidden=1
)
:: If file is hidden, remove both attributes, then hide again.
if %hidden%==1 (
attrib -S -H "%1%"
attrib +H "%1%"
) else (
attrib -S "%1%"
)
endlocal
Solution 2
I found two more programs:
Attribute Changer - http://attribute-changer.software.informer.com/
File Attribute Stripper 1.0 - http://www.softpedia.com/get/System/File-Management/File-Attribute-Stripper.shtml
some time ago I was using "RemoveR PRO" from - http://www.bigwig.net/softwaredesign/free.htm (dead link now), maybe you can find it in some archives
Solution 3
Install this: http://www.nirsoft.net/utils/bulkfilechanger.zip
or visit http://www.nirsoft.net/utils/bulk_file_changer.html to download the version file of your choice.
Related videos on Youtube
Oztaco
Updated on September 18, 2022Comments
-
Oztaco over 1 year
Is it possible to take away a file's "system" file attribute without using command prompt? Basically, I want to do this:
attrib "folder" -s attrib "file" -s
without using command prompt, or a batch file. Windows explorer properties menu lets you do this for the hidden and read-only attributes, is there a way to do it with the system attribute?
-
tvdo about 12 yearsWithout using the command prompt? Not natively in Windows Explorer as far as I'm aware, but there should be plenty of other GUI programs and possibly even Explorer shell extensions that do it. What exactly do you want? A GUI program or something within Explorer?
-
Oztaco about 12 yearsyeah, i want a way to do this faster than executing a batch file, or CMD each time
-
Vineet Menon about 12 years@leaf68: is GUI faster than command line!! I'm afraid, most people won't agree to that!! :D
-
Oztaco about 12 years@VineetMenon lol its not just speed, but a little bit laziness too :P
-
Canadian Luke over 10 yearsA batch file or command line would be much quicker then using your mouse, assuming you have a good typing speed
-
-
paddy about 12 yearsErr, sorry for giving you a batch file solution, which you explicitly stated you don't want, but I think you meant that you just don't want to have to manually type stuff in. Using the context menu avoids this. =)
-
Oztaco about 12 yearsah thanks, i've been trying to find that exact article because i recently formatted my PC, and used that before :) ...yeah i just didnt want to retype it each time
-
Synetech over 10 yearsAside from the console window showing, your idea won’t work at all if the file has the hidden attribute set. When you use
attrib
, it won’t change theH
orS
settings if the other is set (it will say not resetting XXXX file). You would need to strip (or set) both, then change the one that you did not want to modify back to what it was before. This means using environment settings and/or temporary files. -
slm over 10 yearsWelcome to Super User! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
-
paddy over 10 yearsThanks @Synetech I have offered an extension to handle this. Perhaps to address the aesthetic issue of the command window briefly showing, you could use a shortcut with the "Run minimized" setting.
-
Synetech over 10 yearsNice. (Isn’t it annoying how sometimes even slightly increasing a program can drastically complicate it? You can’t even use
find
for this since it prints the filename.)