Jump to content

File attributes


shornw
 Share

Recommended Posts

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

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

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...