Endgame Posted January 12, 2006 Share Posted January 12, 2006 I am attempting to remove the archive file attribute for all files on a hard drive. I am using the following code: FileSetAttrib("C:\","-A",1) When I use this code, nothing seems to happen. Any suggestions? EndgameMy UDFsFile Size ConvertMacros in INI UDF Link to comment Share on other sites More sharing options...
BigDod Posted January 12, 2006 Share Posted January 12, 2006 I am attempting to remove the archive file attribute for all files on a hard drive. I am using the following code: FileSetAttrib("C:\","-A",1) When I use this code, nothing seems to happen. Any suggestions?Surely it should be FileSetAttrib("C:\*.*","-A",1) 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 Link to comment Share on other sites More sharing options...
Endgame Posted January 12, 2006 Author Share Posted January 12, 2006 Surely it should be FileSetAttrib("C:\*.*","-A",1) That's what I thought as well but when I tried it, it did not recurse beyond the root of C:\. EndgameMy UDFsFile Size ConvertMacros in INI UDF Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 12, 2006 Moderators Share Posted January 12, 2006 I wouldn't imagine that running past the current directory personally... You could always do a recursive search for all directories and do a For/Next loop. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
BigDod Posted January 12, 2006 Share Posted January 12, 2006 I wouldn't imagine that running past the current directory personally...Why not ? The help file indicates that it should. 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 Link to comment Share on other sites More sharing options...
Endgame Posted January 12, 2006 Author Share Posted January 12, 2006 (edited) I wouldn't imagine that running past the current directory personally...You could always do a recursive search for all directories and do a For/Next loop.I was initially going to use a recursive loop to perform the task but when it stated in the help that is was recursive itself, I figured that would solve the problem. Apparently not. Edited January 12, 2006 by Endgame EndgameMy UDFsFile Size ConvertMacros in INI UDF Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 12, 2006 Moderators Share Posted January 12, 2006 Why not ? The help file indicates that it should.Yep, that's what I get for replying to a topic on a function I've never used ;make all .bmp files in C:\ and sub-directories writable and archivedFileSetAttrib("C:\*.bmp", "-R+A", 1)If @error Then MsgBox(4096,"Error", "Problem setting attributes."By the way, am I the only one that the ')' bracket is missing on the end of the MsgBox()?Anyway... without trying to stick my foot in my mouth again on a function I've not used... So a question... on the +- options... if '+A' archives them, I'm assuming that '-A' removes them from archive? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Endgame Posted January 12, 2006 Author Share Posted January 12, 2006 By the way, am I the only one that the ')' bracket is missing on the end of the MsgBox()?Nope.So a question... on the +- options... if '+A' archives them, I'm assuming that '-A' removes them from archive?That's exactly correct. EndgameMy UDFsFile Size ConvertMacros in INI UDF Link to comment Share on other sites More sharing options...
BigDod Posted January 12, 2006 Share Posted January 12, 2006 By the way, am I the only one that the ')' bracket is missing on the end of the MsgBox()?Obviously a typo in the help file, we can forgive that in such a good help file. So a question... on the +- options... if '+A' archives them, I'm assuming that '-A' removes them from archive?That is what the help file says. 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 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 12, 2006 Moderators Share Posted January 12, 2006 Obviously a typo in the help file, we can forgive that in such a good help file. No, I should have reitterated... I'm using beta .99 and wondering if the typo was fixed in the others.. not complaining on the help file by any means...That is what the help file says. Ok SmartAss!! And actually the help files says: The attributes that can be modified with the function are + or -: which is left for interpretation (although it should be as plain as black and white that way, it could still go left un-said on what it does.) I think this is your way of telling me to go to bed Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Endgame Posted January 12, 2006 Author Share Posted January 12, 2006 I'm using beta .99 and wondering if the typo was fixed in the others.. notI'm using Beta .100 and it is still there as well. EndgameMy UDFsFile Size ConvertMacros in INI UDF Link to comment Share on other sites More sharing options...
BigDod Posted January 12, 2006 Share Posted January 12, 2006 And actually the help files says: which is left for interpretation (although it should be as plain as black and white that way, it could still go left un-said on what it does.) I think this is your way of telling me to go to bed Here is what the help file says higher up than you was reading+-RASHNOT Attribute(s) to set/clear. e.g. "+A", "+RA-SH"I hope your headache of earlier has eased. 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 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