Re: hide file
Re: hide file
- Subject: Re: hide file
- From: Doug McNutt <email@hidden>
- Date: Sat, 12 May 2012 11:40:43 -0600
At 12:09 +0200 5/12/12, KOENIG Yvan wrote:
>Le 12 mai 2012 à 11:46, KOENIG Yvan a écrit :
>
>>Hello
>>
>>I'm puzzled.
>>
>>I know the way to hide a file thru System Events but can't do that if administrator privileges are required.
>>I tried to use
>>
>> quoted form of POSIX path of thePath
>> do shell script "/usr/local/bin/setfflags -i 1 " & result with administrator privileges
>>
>>but I got an error message stating that the command can't be use because it's a PPC one.
>>
>>Is there a way to achieve the wanted goal ?
>>
>>Yvan KOENIG (VALLAURIS, France) samedi 12 mai 2012 11:46:19
>>
>
>I was able to do the trick with :
>
> quoted form of POSIX path of thePath
> do shell script "/Developer/usr/bin/SetFile -a V " & result with administrator privileges
>
>but I can't give this scheme to the original asker which doesn't installed the Developers tools.
>
I'm still on 10.3.9 to accommodate my SE/30 file server but you can probably copy the SetFile tool from the Developer directory and put it in /User/username/bin/ on a machine that doesn't have the developer tools. You might need to add $HOME/bin at the beginning of $PATH but AppleScript seems to want full path names for the tools anyway.
Your results may vary with more modern - and less UNIX - versions of Apple's OS.
And watch the SetFile spelling. Case doesn't matter in MPW but in OS 10 it does, even if the file system is case insensitive. That may be a shell effect.
There are other bits in the HFS directory that are handled by the -a option. A small v will reverse the capital V. A more common use of SetFile is to change type and creator codes with the -t and -c options.
When Apple really works at hiding a file another option is to create an alias or link with a name that is safe.
--
--> 0010 0100 0110 1000. Who do we appreciate? <--
With apologies to B Fagin of the Colo Spgs Gazette.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden