Re: How can I control invisible files
Re: How can I control invisible files
- Subject: Re: How can I control invisible files
- From: Christopher Nebel <email@hidden>
- Date: Mon, 05 Nov 2012 20:40:45 -0800
On Nov 2, 2012, at 4:28 PM, Robert Poland <email@hidden> wrote:
> I just discovered that when scripting Finder windows (size, location, etc.), if they misbehave, deleting the .DS_Store file helps.
>
> Only problem is that, apparently, the invisibles must be visible to delete them.
>
> Question; Is there a way to detect and control the Hide/Show Invisibles.
>
> if controlKeyDown then -- delete file ".DS_Store
> delete file ".DS_Store"
> end if
Finder will happily let you deal with invisible items, but only if you refer to them as "items":
tell app "Finder" to delete item ".DS_Store" of home
To get Finder to show you everything, including invisible files:
defaults write com.apple.Finder AppleShowAllFiles -bool YES ; killall Finder
--Chris Nebel
AppleScript Engineering
_______________________________________________
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