luis713 Posted October 29, 2012 Share Posted October 29, 2012 hi, I have this line FileSetAttrib("c:\*", "-H") it works perfect with all files and folders, but there's one exception, this line doesn't show files without extension, for example if i have a file named "Test.txt" it works perfect, but if I erase the extension doesn't work. do you know where the problem is? thanks Link to comment Share on other sites More sharing options...
funkey Posted October 29, 2012 Share Posted October 29, 2012 And what happens if you try FileSetAttrib with the exact filename? If this works you could use _FileListToArray(). Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
luis713 Posted October 29, 2012 Author Share Posted October 29, 2012 And what happens if you try FileSetAttrib with the exact filename? If this works you could use _FileListToArray(). If i use filesetattrib with the exact filename it works, I tryied this code but doesn't work, can you help me?$FileList = _FileListToArray("D:", "*", 0)FileSetAttrib($FileList, "-h") Link to comment Share on other sites More sharing options...
funkey Posted October 30, 2012 Share Posted October 30, 2012 #include <File.au3> Global $sFolder = "D:" Global $aFileList = _FileListToArray($sFolder, "*", 0) For $i = 1 To $aFileList[0] FileSetAttrib($sFolder & $aFileList[$i], "-h") Next Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
luis713 Posted October 30, 2012 Author Share Posted October 30, 2012 (edited) thanks for replying, your script works but when i'm trying to changing attributes to subfolders it doesn't work or is very slow, i have replaced your line FileSetAttrib($sFolder & $aFileList[$i], "-h"), for this one FileSetAttrib($sFolder & $aFileList[$i], "-h", 1) where the number indicates to recurse subfolders, do you know where the problem is? I need learn how to use arrays, i have read the wiki but i can't understand thanks muttley Edited October 30, 2012 by luis713 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