Puntel
11th July 2002 17:23 UTC
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.
Smile2Me
11th July 2002 17:29 UTC
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.
Puntel
11th July 2002 17:42 UTC
Okay Smile2Me,
The script works.
Thanks once again for you help.
Regards.
:up:
Smile2Me
11th July 2002 17:52 UTC
You're welcome :D.
Greetz,
-Hendri.
Puntel
11th July 2002 17:57 UTC
Grazie !!!!
(Thanks in Italian)
kichik
11th July 2002 19:02 UTC
It is not a NSIS bug. It is just the behavior of SetFileAttributes.
Puntel
12th July 2002 14:24 UTC
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.
Smile2Me
12th July 2002 14:41 UTC
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.