Old 11th July 2002, 16:23   #1
Puntel
Junior Member
 
Join Date: Jul 2002
Location: Rome - Italy
Posts: 4
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.
Puntel is offline   Reply With Quote
Old 11th July 2002, 16:29   #2
Smile2Me
Guest
 
Posts: n/a
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.
Attached Files
File Type: zip attrib.zip (986 Bytes, 175 views)
  Reply With Quote
Old 11th July 2002, 16:42   #3
Puntel
Junior Member
 
Join Date: Jul 2002
Location: Rome - Italy
Posts: 4
Thumbs up

Okay Smile2Me,

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

Puntel is offline   Reply With Quote
Old 11th July 2002, 16:52   #4
Smile2Me
Guest
 
Posts: n/a
You're welcome .

Greetz,
-Hendri.
  Reply With Quote
Old 11th July 2002, 16:57   #5
Puntel
Junior Member
 
Join Date: Jul 2002
Location: Rome - Italy
Posts: 4
Smile

Grazie !!!!

(Thanks in Italian)
Puntel is offline   Reply With Quote
Old 11th July 2002, 18:02   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It is not a NSIS bug. It is just the behavior of SetFileAttributes.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 12th July 2002, 13:24   #7
Puntel
Junior Member
 
Join Date: Jul 2002
Location: Rome - Italy
Posts: 4
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.
Puntel is offline   Reply With Quote
Old 12th July 2002, 13:41   #8
Smile2Me
Guest
 
Posts: n/a
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.
  Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump