GP SoftwareTwitter
Opus FAQsManualCommandsObjects

How to hide desktop.ini with a button command

#1

Hi dear all
I have a button in my tollbar with this code

Clipboard EXPANDNEWLINES SET [.ShellClassInfo]\nIconResource={file},0
Clipboard PASTE PREFERTEXT 
Rename "Clipboard Text.txt" TO "desktop.ini"
SetAttr ATTR=H
SetAttr FILE={sourcepath} SETATTR=r 
SetAttr ATTR=H

what this button does?
I select a .ico file and click this button
This button hide the .ico file
create a desktop.ini file
that's all!
I want to hide the diesktop.ini file also with this button.
how to do that?

#2

The two SetAttr ATTR=H lines probably aren't doing anything.

You want to add a line like this:

SetAttr FILE={sourcepath}desktop.ini SETATTR=hs

If it was me, I'd re-write it as a script so you don't need to trash what's in your clipboard just to save text into a file, but if that doesn't bother you then adding the line above should be all you need. (I'm assuming you found the code here: How to change file attribute to hide)

#3

Thanks dear Leo, you are really helpful. I have no ability to write a script with that. if you write the script for me, it will really helpful for me.