Sign in to follow this  
Followers 0
undead

[file] permissions attributes

4 posts in this topic

how to check and change permissions and attributes for a file ?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

This is one I posted a while ago, search for files with Read only attribute, you could modify it quite easily you'll want to look up FileSetAttrib() which you could use instead of where I put up a message box

Edit* use it with the beta

Search ("D:\Kiosk");replace with your search directory



Func Search($current)

    Local $search = FileFindFirstFile($current & "\*.*")
    While 1
        Dim $file = FileFindNextFile($search)
        If @error Or StringLen($file) < 1 Then ExitLoop
        If Not StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "." Or $file <> "..") Then

            If StringInStr(FileGetAttrib($current & "\" & $file), "R") then MsgBox (0,$current & "\" & $file, "Has Attribute r")
            
        EndIf
        If StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "." Or $file <> "..") Then
            Search($current & "\" & $file)
            
        EndIf
    WEnd
    FileClose($search)

EndFunc
Edited by ChrisL

Share this post


Link to post
Share on other sites

You can use the Windows commandline tool called CACLS to modify permissions on files.

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