78

I love my Mac and how things generally just work. Now and again, however, one finds a few annoyances. My latest one is that I cannot find a refresh button anywhere to update a file listing in a Finder window.

Please note that I am aware that refreshing is generally not needed as new files are automatically added to Finder windows. In my case I have a NAS on my network, and to update a file listing in a NAS folder I currently need to change directory to somewhere else and then back again to see new files.

Is there a way to request an updated file listing in a Finder window?

erikxiv
  • 968
  • 2
  • 8
  • 9

7 Answers7

72

Yes!

A simple AppleScript can instruct the Finder to tell its front window to update every item. Such an AppleScript can be saved as an Application and then dragged to the Finder toolbar to give you a refresh button.

The AppleScript you need is quite simple:

 tell application "Finder" to tell front window to update every item

Paste the above text in Script Editor (in the Utilities folder), then use Export -> Application. THAT executable should be dragged, with CommandOption, to the Finder toolbar (that is, the top bar, not the sidebar).

You can change the icon following this answer.

jaume
  • 15,010
Daniel
  • 34,803
  • 13
    Just as a footnote: In Macericks you need to press [cmd]+[alt] as you drag the app to the Finder toolbar. This is an excelent answer (just used it and works great) – Barranka Nov 14 '13 at 21:07
  • 1
    Indeed, Daniel's solution works great. Although I wish there was a way to run the script without having the AppleScript open. Also thanks to Barranka for the hint about pression CMD and ALT keys. – t0r0X Feb 02 '14 at 00:26
  • Thanks for this workaround. Maybe I create a daemon which runs this script once per second (but that's not very power efficient), although that polling approach is not very power efficient, would prefer Finder to automatically properly update based on file system events. Isn't there a fix for this? (Erasing com.apple.finder.plist and .DS_Store in affected folders did not fix it for me). – porg Mar 06 '14 at 11:43
  • 1
    I have tried this example in yosemite with no luck. Does this still work for you? – Chris Hough May 22 '15 at 19:21
  • @chrishough works for me with 10.11. – Syrtis Major Jun 26 '16 at 11:35
  • 10
    Great answer, just to make the things a bit clearer: this still works in Sierra. You should paste the content of the answer in Script Editor, then use Export -> Application. THAT executable should be dragged, with cmd+alt, to the finder toolbar (the top bar, not the sidebar) – Alan Franzoni Sep 14 '17 at 16:45
  • I just created the script and then saved as an APP. I then added the app to my toolbar. That way which ever window is active becomes the front window. This does not require that AppleScript be running. – ChuckT Jul 02 '14 at 14:37
  • Then, you can use this to change the icon to something more sensible – Ciprian Tomoiagă Sep 18 '18 at 08:25
  • 1
    This still works on Catalina (created a script in Script Editor, File -> Export -> File Format -> Application). I held down CMD while dragging the app into the Favorites list in Finder. – Matt Oct 25 '19 at 15:27
  • 14
    Wow it is obnoxiously absurd that Apple hasn't built in a simple refresh keyboard shortcut like Windows has had with F5 since Windows 95 or earlier. What is wrong with Apple? Why can't they catch up with the rest of the world sometimes? – Sephethus Apr 28 '20 at 20:27
  • I noticed that the app exported from Script Editor will cause the Finder window to temporarily lose focus (Big Sur). This doesn't happen when using Automator instead to create the app. – Brecht Machiels Dec 07 '21 at 11:25
  • Note: on macOS 11, this does not work to refresh FTP listings mounted through Finder itself. There seems to be a special cache hiding somewhere. – joshfindit Mar 31 '22 at 23:48
  • 1
    Apple can't seem to figure out a simple refresh functionality in their Finder app in 2022. This is laughably absurd. – papar Dec 13 '22 at 17:46
  • 1
    This solution works incredibly well, except for me I have to enter my password three times to get it to go. Is there a simple solution to that also? – RichardBJ Jul 13 '23 at 11:21
  • You will be there for 3 hours typing in your password... horrible! Couldn't cancel the process or the script. – John Mar 15 '24 at 18:03
9

To relaunch the Finder:

  1. Hold the Option key and right-click the Finder icon in the Dock, then select Relaunch.
  2. Press Option-Command-Escape or choose Force Quit from the Apple menu, then select the Finder and click Relaunch.
  3. Log out and log back in to your user account.
nohillside
  • 100,768
6

The easiest way to have the Finder refresh its listing is to enter a subfolder and click the back arrow to come back to the original folder. You can also click the back arrow to go to the previous folder, and then the forward arrow.

The other way is to use an Applescript as suggested in Daniel's answer.

Using osascript, this command can be copy/pasted directly into Terminal, without first creating a script:

osascript -e 'tell application "Finder" to tell front window to update every item'
mivk
  • 1,047
  • 1
    Going to different folders and back works for me sometimes but not while moving a couple of 7gig files onto a USB. Even when the files were fully moved it still took minutes until Finder was happy that it had all concluded and updated what it was showing me in both source and destination folders. – hippietrail Jun 23 '22 at 09:00
5

Disclaimer! - This is not a method to refresh current folder but a method to change folders quickly without having to use mouse or keeping action script open all the time which will eventually refresh the folder view.

It is almost as fast as pressing F5 in windows with only one difference - you need two hands.

First way:

Command - [ and then ] (no need to release Command, just keep it and press other keys quickly - it's fast!) will go to previous folder and back effectively refreshing your view on current folder - same keys are used in Chrome for back and forward.

But sometimes you just opened Finder and there is no folder to go back to. For this case there is:

Second way:

Command - Up and then Down - will go folder up and then folder down thus coming back to your original folder and refreshing the view. Same as in previous case keep Command down all the time. Same keys can be used in general in Finder to go up and inside folder.

blur
  • 161
  • 2
    Honestly, CMD+UP,DOWN is preferable to me than writing a script (for a feature that should be built in). While it's aesthetically annoying to have to actually change directories to get a refresh, it's so fast on the fingers is functionally almost equivalent to, say a CTRL+R that every other domain has (yes, I'm salty). Also, question: is there ALWAYS something for CMD+UP to go to? FYI My application is to see the size of a file go up as it's rendering in iMovie, to make sure it's making progress. – john v kumpf Feb 21 '21 at 16:52
  • 1
    This generally works: the files are updated. But this does not update the icons if the "opens with" is changed. – SMBiggs May 12 '23 at 15:12
2

I've noticed that changing the view in Finder seems to refresh the content of the Finder window. What I mean by changing the view is going from e.g. Icon view to List. I've not done any extensive testing, but it did the trick for me last night when I copied a file into the NAS box in the Terminal, while the directory I copied the file into was also open in Finder.

mike
  • 1,921
1

If it's a remote server, sometime one has to reconnect to refresh the file list.

i--
  • 119
-3

This worked for me on El Capitan

http://web.archive.org/web/20160525204735/http://www.macupdate.com/app/mac/24714/refresh-finder

keen
  • 696
Dalim
  • 1