Jump to content

Recommended Posts

Posted

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 :D

Posted

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 to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Posted

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")

Posted

#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 to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Posted (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 by luis713

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
×
×
  • Create New...