Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a Finder window update key Desktop
This hint is handy when Finder does not update its window contents after an application modifies a file, and clicking in the window does not update as it should. This hint serves the same purpose as F5 in Windows Explorer.
  1. Create the following Applescript
    try
      tell application "Finder" to update items of front window
    end try
    
  2. Assign your new AppleScript to a hotkey using Butler
    1. Under Butler Configuration, Ccreate a new file item (command+N) within the Invisible items container.
    2. Set the path to the compiled AppleScript created in step 1.
    3. Set it to open with "Execute Applescript"
    4. Assign a hotkey (I assigned mine to command+option+`)
That's it!
    •    
  • Currently 2.50 / 5
  You rated: 2 / 5 (8 votes cast)
 
[19,006 views]  

Create a Finder window update key | 29 comments | Create New Account
Click here to return to the 'Create a Finder window update key' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a Finder window update key
Authored by: seven5 on May 24, '04 11:58:10AM

NICE!

Or use iKey and just paste the applescript into a new keycommand and not need to create an actual file at all :)



[ Reply to This | # ]
Create a Finder window update key
Authored by: mschaff on May 24, '04 12:05:00PM

It pains me that this hint is even necessary with the "World's Most Advanced Operating System".

However, much appreciation goes to the author for this hint.



[ Reply to This | # ]
Create a Finder window update key
Authored by: deleted_user18 on May 24, '04 02:25:26PM

As FreeBSD didn't have the neccesary features until some time ago it was not possbile for Apple to implement this in a clean manner.

As FreeBSD now supports this wait for a new finder version to make use of it.

Until then there is also an Applicaction called "Nudge" available to do the same the Apple Script does.



[ Reply to This | # ]
Create a Finder window update key
Authored by: ngb on May 24, '04 12:20:42PM

The times I find myself needing this the most is when I'm connected to a Windows share on our network. There's probably a reason Window Explorer needs F5.



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 24, '04 03:42:39PM

I see it regardless of whether I'm connected to Windows servers or not. I see it on shared Mac volumes and on FW drives.

You're right, there is a reason why Windows has a key for this: because it's a good idea. We should have that, too. Mac OSX still isn't fully accessible via the keyboard, but when it is ... wow! That'll be great, for lots of people: people who use assistive technologies, people who suffer carpal tunnel and related problems [I do], and people who became accustomed to the speed and ease of [almost] keyboard-only usage [like me].

Windows isn't totally accessible via keyboard either, but in this area, it exceeds OSX by leaps and bounds. That's one reason I prefer to use Photoshop on the PC -- I can do much, quickly, via the keyboard and do it with less stress on my poor hands and wrists.

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: BMarsh on May 25, '04 02:10:40AM

You can turn on keyboard access in System Preferences - Keyboard & Mouse
this will allow you to access all menu items from the keyboard.
you can even create new shortcuts.

It is not the same as windows access, but it is functional.



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 25, '04 04:15:50PM

I should have made it clear that I already know about the keyboard access items in System Preferences, and I already have them engaged. When I compare OSX's keyboard access with other OSes, I'm doing so with that "full keyboard access" in mind, and it's always engaged on all the Macs I use. It's just not enough, not yet. Close, but in a case of accessbility for the disabled, close is seldom sufficient, and in my case, it does little to help with the Photoshop comparison. I can get to the Image menu's Image Size command in two keystrokes on a PC, and it takes several more on my Mac, for example.

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: Han Solo on May 24, '04 01:21:44PM
In my experience this problem arises regularly with list view, especially with remote servers. Most — but certainly not all — the time, quickly switching to icon view and back to list view will update the modification dates/times of the files in question. (Interestingly, switching to column view and back has no effect.)

But since I am usually using the mouse to manipulate files and folders in the Finder, I would find it even more useful to somehow attach this AppleScript to an icon in the Finder toolbar. I haven't tried it yet, but I'm guessing one could just drag the AppleScript icon to the toolbar. Anyone know if that's possible — and how one might set a custom icon in the toolbar? TIA.

[ Reply to This | # ]

Create a Finder window update key
Authored by: greybird on May 24, '04 01:34:16PM

When I need to update the window, I normally click on the desktop then back to the Finder window that needs updated. This normally works, but I don't the networked folders that much either.



[ Reply to This | # ]
Create a Finder window update key
Authored by: webbix on May 25, '04 12:25:31AM

Even though I do use Butler I am not a 'hotkey' fan typically so I did exactly as you are asking. I simply saved as a run-only app and dragged it to the finder window menubar. I also have a 'resize' script to set to column view and a set window dimension. I don't use the icon view so mine has a label for 'Refresh'



[ Reply to This | # ]
Create a Finder window update key
Authored by: steepndeep on May 24, '04 01:40:24PM

I actually have a similar script

tell application "Finder" to update every file in folder of the front window

Then I made a nice icon for it, and put it in the Toolbar.



[ Reply to This | # ]
Care to share your nice icon for it?
Authored by: SimonDorfman.com on May 24, '04 02:47:02PM

i put it in the toolbar too. Care to share your nice icon for it?



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 24, '04 04:43:42PM

When I run the script, it pops up a dialog, asking me if I want to run it [I don't want it to ask me], and then it fails when I click OK, popping up another dialog that says "Can't continue" ... I think it's because I have only folders in this window, and no files.

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 24, '04 04:50:07PM

Neither the short script that mentions files, nor the script first mentioned, in the article itself, will run for me without first popping up a dialog box. What's up? Did I set some preference, in the forgotten past, to always ask me before running a script?

I have set YoupiKey to run it, and it's saved as an app, but still I get the dialog box.

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: xcgr on May 24, '04 06:34:44PM

When saving the script in Script Editor, there's an Option checkbox for "Startup Screen". Trying turning that off.



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 25, '04 04:17:54PM

Thanks! I didn't notice it. That makes the script run without popping up dialogs, just as you say.

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: cudaboy_71 on May 24, '04 01:55:37PM

better yet, attach a script to the desktop folder and it'll do it on its own:

on adding folder items to this_folder after receiving added_items
tell application "Finder"
update desktop
end tell
end adding folder items to

---
if it aint broke, break it!



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 24, '04 04:32:52PM

Wow, you mean this will automagically keep all my windows updated, even the ones on remote computers like the Windows box downstairs?

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: Gene on May 24, '04 02:48:29PM

I used Nudge CM - http://www.brockerhoff.net/nudge/ and it works fine....



[ Reply to This | # ]
Create a Finder window update key
Authored by: seqiro on May 24, '04 03:00:01PM

Nudge has worked very well for me too.



[ Reply to This | # ]
The problem with Nudge
Authored by: sfgecko on May 24, '04 06:29:35PM

I've used Nudge prior to this hint, and there are a couple problems with it. First, w/ Nudge you have to select the files you want to refresh. This defeats the purpose of doing a quick refresh w/ a single keystroke command, e.g. F5 in win.

Second, if you select a few big files and try to bring up the contextual menu to execute Nudge, it takes several seconds for the menu to come up. Without nudge installed, the munu comes up much quicker.



[ Reply to This | # ]
The problem with CMMs...
Authored by: jiclark on May 25, '04 12:02:33AM

...there's a known issue where certain Contextual Menu Modules take a lot longer than others to come up when right-(or control-)clicking an item. I found, for instance, that if I took the CMM 'Ittec' out of my Contextual Menu Items folder, the annoying several-second delay disappeared!

If I were you, I'd do a systematic disable-enable routine on each of my CMMs until I found the one that was slowing down the works...

And BTW, I think it was mervTormel that I owe thanks to for pointing this out to me many moons ago! [Maybe Rob should turn this into a hint!?!?]

Later,
John



[ Reply to This | # ]
The problem with CMMs...
Authored by: sfgecko on May 25, '04 05:38:30PM

i don't know what Ittec is, and don't see it anywhere on my mac. i'm pretty sure it was nudge causing the cm slowdown.



[ Reply to This | # ]
Create a Finder window update key
Authored by: highbrow on May 25, '04 04:31:03AM

I tried this script, and called it via iKey; I also downloaded and installed Nudge.

For a folder on an smb share on a PC, Nudge won; the script above didn't detect new files added to a shared directory, new files would only show up if a previously present file was deleted on the PC, and then the script called. Nudge seems to refresh all files, inc. new ones, each time.

Working in an x-platform environment, this situation has driven me nuts for a long time, I'm glad this hint pointed me to a solution (even if it wasn't the solution itself ;-).

Using the down arrow key to move though a list view window sorted by date modified, and having the currently selected item jump to the top of the list as it is selected, is an embarassment in a modern OS....



[ Reply to This | # ]
Create a Finder window update key
Authored by: osxpounder on May 25, '04 04:29:08PM

I see what you mean; that's a pity, because the main reason I wanted this refresh-key ability was for refreshing Samba shares. I confirmed your results by a test:

I connected via smb to a PC in my office. I opened a folder, and copied some files into it from my Mac.

At the PC's keyboard, I selected all the files in that folder, pressed CTRL-C, then CTRL-V to paste copies of them. 7 new files appeared on the PC's screen.

I ran the script:

try
tell application "Finder" to update items of front window
end try

... and no refresh occurred. I also clicked on a file in the shared folder, in Finder. No refresh. Switching to Icon or Column views, or back again, caused no changes, nor did CMD-A to select all files.

But when I Option-dragged a file to copy it, it copied, then the window refreshed.

Meanhile, on the PC [they are both on the same desk], the folder windows updated instantly, every time a change was made. I haven't tried it the other way round, to see if Windows will update a shared OSX folder. I always connect to the PC from the Mac because that's faster on our network [less time waiting for the authentication stuff].

I think I'll just wait for the hoped-for Finder update, based on the revelation that FreeBSD has recently been updated [see above].

---
--
osxpounder



[ Reply to This | # ]
Create a Finder window update key
Authored by: sfgecko on May 25, '04 05:49:09PM

Actually, doing a CTRL+C and CTRL+V to copy files on the Windows side doesn't require this script to refresh from the Mac view. I tried this scenario, and for me Finder automatically refreshes the SMB shared folder contents when I click into it. So the script isn't even necessary for this scenario.



[ Reply to This | # ]
Create a Finder window update key
Authored by: sfgecko on May 25, '04 05:46:11PM

The script works fine for me to refresh an SMB shared folder on Windows XP. Not sure why it doesn't work for you.



[ Reply to This | # ]
Disappearing folders: who knows?
Authored by: acalvet on Sep 15, '04 05:49:56AM

None of these scripts seem to solve my problem:
in Finder's list view, if I move (don't copy) an "expanded" folder (that is: with the little arrow pointing down to show the items inside the folder) into another expanded folder, the Finder won't refresh its window and my moved folder will disappear until I edit something else inside the window. I think it should be enough to modify this applescript but my tests had no success. Somebody help me please?

---
:: And ::



[ Reply to This | # ]
Create a Finder window update button
Authored by: mfripp on Apr 15, '07 04:16:59PM
You can get quite a nice icon by copying the refresh button from Safari.

Option 1: Navigate to the file at /Applications/Safari.app/Contents/Resources/Reload.tif, double-click, then in Preview choose Edit->Copy (unfortunately, this doesn't seem to handle transparency well).

Option 2: Open Safari, then use Command-Shift-4 to get a selection crosshair. Then hold down ctrl while drawing a box around the refresh button. This will place a copy of the button on the clipboard. The anti-aliasing will be just right because Finder uses the same brushed metal background as Safari. The best way to get the button exactly is to line up your crosshairs with the top and left gray lines around the refresh button, click, then drag down to one pixel beyond the bottom and right gray lines around the button.

Then paste the clipboard into the Get Info... window of your AppleScript.

Finally, drag the AppleScript to the Finder toolbar, and it will look great. I've found that if I save the AppleScript as an "application bundle" it runs faster than if I save it as an application. In theory it should also be possible to use LSBackgroundOnly in the info.plist of the bundle to keep an icon from appearing in the Dock, but I haven't gotten that to work ( http://forums.macrumors.com/archive/index.php/t-94451.html ).

[ Reply to This | # ]