Jump to content
Sign in to follow this  
luis713

problem showing hidden files

Recommended Posts

luis713

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

Share this post


Link to post
Share on other sites
funkey

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.

Share this post


Link to post
Share on other sites
luis713

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

Share this post


Link to post
Share on other sites
funkey

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

Share this post


Link to post
Share on other sites
luis713

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

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  

×