shornw Posted January 11, 2011 Share Posted January 11, 2011 Hi all. Typically, a bunch of users sent around a cute little christmas tree in December, however they are now whining that they cant get rid of it. It creates a bunch of folders in the temp dir that are Read-Only, Hidden and zipped. I need to remove the RH attributes to delete them, however AutoIT help specifies that there cannot be spaces in the name pattern. Any ideas how I can reset the attribs on folders with spaces ( I have tried a .bat file, but wildcards dont seem to work with the "attrib" command) Thanks [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
KaFu Posted January 11, 2011 Share Posted January 11, 2011 (edited) Afaik that's only true if you want to use wildcards. This works for me: FileSetAttrib("c:\test dir\","-RH") Edited January 11, 2011 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
saywell Posted January 11, 2011 Share Posted January 11, 2011 Why not just delete the temp file and let Windoze create a new, empty one? William Link to comment Share on other sites More sharing options...
ripdad Posted January 11, 2011 Share Posted January 11, 2011 Why not just delete the temp file and let Windoze create a new, empty one?That would be great .. if you could get away with it.The problem is that some of the files that are inside the temp are probably used by Windows -- and as such,Windows won't let you delete the temp folder or any file it is using. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
computergroove Posted January 11, 2011 Share Posted January 11, 2011 Is the temp location the same path on all the machines? Are the temp files for the xmas tree the same name on all machines? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
ripdad Posted January 11, 2011 Share Posted January 11, 2011 (edited) One could go to safe mode and run this:Local $temp = @TempDir If FileExists($temp) Then If FileSetAttrib($temp, "-RASHNOT", 1) Then If DirRemove($temp, 1) Then DirCreate($temp) EndIf EndIf ExitHowever, that does not guarantee that the program won't spawn again from a run entry. (Hint)-Edit-By the way, the more I think about it ...There is no reason why a program like that should set attributes to hidden and read only. It sounds like a virus to me. Edited January 11, 2011 by ripdad "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward 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