[OS X TeX] Getting Finder to Refresh

Chris Goedde cgoedde at condor.depaul.edu
Fri Jan 21 12:29:31 EST 2005


I was curious how to do this, but I don't have this problem currently. 
I have the following
proposed solution, but I haven't tested it. Does this work, Herb? (Note 
that osascript is
a shell command for running an applescript.)

osascript -e 'tell application "Finder" to update folder "Path to 
folder"'

Here "Path to folder" is the full path of the folder, in quotes, e.g. 
"Users:foo:Documents:FolderName".

PS. My applescript skills are primitive. Even if this works, is there a 
better way to write this?

PPS. I couldn't make this work with a window, e.g. 'tell application 
"Finder" to update window
"WindowName"' gave the error that the window didn't understand the 
update message. ???

Chris Goedde


On Jan 21, 2005, at 11:05 AM, Claus Gerhardt wrote:

> There is in Applescript a Finder command
> update: Update the display of the specified object(s) to match their 
> on-disk representation
> 	update  reference  -- the item to update
>  Lokk in the Finder's AS dictionnary, which should be what you look 
> for.
>
> Claus
>
> On Jan 21, 2005, at 17:19, Herb Schulz wrote:
>
>> Howdy,
>>
>> I'm putting together a Dropscript based on pgn2ltx for converting 
>> .pgn Chess
>> Game files into skak (actually skaknew) based .tex files. The shell 
>> script
>> works fine but the Dropscript (you can drop a group of files on it 
>> and it
>> will convert all the .pgn's to .tex's) but the Finder takes it bloody 
>> time
>> to refresh and show the new .tex files in the folder. Is there a shell
>> command I can add to the script to tell the Finder to refresh window
>> contents?
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest.com)
>>
>> --------------------- Info ---------------------
>> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>>            & FAQ: http://latex.yauh.de/faq/
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>>
>>
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list