Archive: SetFileAttributes


SetFileAttributes
Hi all,

I am not getting the expeted result while running the following script line: SetFileAttributes '$INSTDIR\data\*.*' Normal

This folder and its files are being copied from a CD as Read-only attribute marked and I am trying to remove it but it seams the wildcards does not work properly. If I specify an individual file it works... I was wondering if it was a bug.

Hendri (Smile2Me) has provided a script to workaround it and suggest me to post it...
Thanks in advance.


So is the behavior of SetFileAttributes (*.* does not work) indended or is it a bug? I expect the latter.

As a workaround, here's a small script with demo.

Have fun with it, greetz,
-Hendri.


Okay Smile2Me,

The script works.
Thanks once again for you help.
Regards.

:up:


You're welcome :D.

Greetz,
-Hendri.


Grazie !!!!

(Thanks in Italian)


It is not a NSIS bug. It is just the behavior of SetFileAttributes.


Suggestion
Okay Kichik,

In this case I would suggest to change the documentation that says:
"Sets the file attributes of 'filename' (which can contain wildcards)..."
That was exactelly what I was trying... change attributes using wildcards... It will avoid in the future this sort of miss understanding.
Regards.


This is a nice suggestion, but KiCHiK cannot do that. The official developer of NSIS is Justin. Read this from Justin. Untill he will be back, I guess nothing will change to the current (1.98) official distribution of NSIS.

-Hendri.