Sign in to follow this  
Followers 0
boxxer

Set Folder Attribute

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



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... :whistle:

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

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)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0