Jump to content

How to automatically rename downloaded files on a Mac


Recommended Posts

How to automatically rename downloaded files on a Mac

Here's what to do when your downloaded Mac files start changing their names all by themselves.


I use the Outlook Web app to access my company's Exchange email and to download work file attachments. When I do so, they download correctly, but the file names have "%20" in the places previously occupied by spaces in the file name. It is very time consuming to fix this manually. Is there any way to prevent this in the first place?


When downloading files online, the "%20" is a web standard to replace the spaces in words and phrases. The best way to prevent this by only uploading files with underscores ("_") instead of spaces. However, with a little Automator action, you can completely rid yourself of these issues with some on-the-fly renaming of files when they are added to the Downloads folder.


In Automator, follow these steps:

1. In the template chooser, select Folder Action.

2. In the "Folder Action receives files and folders added to" drop-down menu, select the Downloads folder.

3. Find the "Get Folder Contents" action in the pane to the left, drag it into the workflow, and check its option for "Repeat for each subfolder found."

4. Add the "Rename Finder Items" action into the workflow underneath the previous action. When prompted, choose not to add the Copy Finder Items action as well, then set the action's options to "Replace Text", and set "Find" to "%20" (without the quote marks), "in full name," and put a space in the Replace field.

5. Save the action by pressing Command + S, then specifying a name.

Each time a file is added to the Downloads folder, this action will run, and it will automatically rename files with names containing "%20" to use spaces instead.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.