Sign in to follow this  
Followers 0
shornw

File attributes

6 posts in this topic

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]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

Why not just delete the temp file and let Windoze create a new, empty one?

William

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (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
Exit

However, 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 by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

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  
Followers 0