boxxer Posted August 13, 2005 Share Posted August 13, 2005 Hello, How can i set a Folder to Read Only? It's there only a function for files?! FileSetAttrib ( "file pattern", "+-RASHNOT" [, recurse] ) Thanks, John. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 13, 2005 Developers Share Posted August 13, 2005 Hello,How can i set a Folder to Read Only?It's there only a function for files?!FileSetAttrib ( "file pattern", "+-RASHNOT" [, recurse] )Thanks,John.<{POST_SNAPBACK}>Work also for Directories.... Just try it... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
boxxer Posted August 13, 2005 Author Share Posted August 13, 2005 I've done this: FileSetAttrib ( "C:\Documents and Settings\MRX\Bureaublad\test", "-R",1 ) When i'm opening the Property window of this folder, the option of Read Only is checked. It should be unchecked.. Link to comment Share on other sites More sharing options...
BigDod Posted August 13, 2005 Share Posted August 13, 2005 I've done this:FileSetAttrib ( "C:\Documents and Settings\MRX\Bureaublad\test", "-R",1 )When i'm opening the Property window of this folder, the option of Read Only is checked.It should be unchecked..<{POST_SNAPBACK}>I have tried this as well and all folders under XP showup as Read 0nly marked by a green box. I also tried it on files and it sets/unsets the properties as required. In XP if you remove the read only then apply you will find that they change back automatically the next time you look at it. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Developers Jos Posted August 13, 2005 Developers Share Posted August 13, 2005 I've done this:FileSetAttrib ( "C:\Documents and Settings\MRX\Bureaublad\test", "-R",1 )When i'm opening the Property window of this folder, the option of Read Only is checked.It should be unchecked..<{POST_SNAPBACK}>Works fine for me on WinXP Pro SP2... Just tested it on a folder on the desktop like you are doing:FileSetAttrib("C:\Documents and Settings\vanderzanjp\Desktop\test","+R",1) Sleep(5000) FileSetAttrib("C:\Documents and Settings\vanderzanjp\Desktop\test","-R",1) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now