For the longest time these “Icon?” (or Icon\r) files kept popping up on my Mac without any rhyme or reason. I would manually delete them. Eventually i got fed up again when several popped up in my main Music folder and all its sub-directories.
I googled a Terminal (bash) command to find and delete files based on name. So, here is the command i settled on for my needs. Be sure to change the directory to whatever one you need:
find Google\ Drive/ -name 'Icon?' -delete
Oh, in case you don’t know how to run this or would like more info into as to what the command actually means:
- Use Spotlight to search and open Terminal.app (Command+Space bar)
- ‘find’ looks for file(s) based on certain parameters
- ‘Google\ Drive/’ is the convention for a folder that has a space in its name; here i’m saying to look for files in my Google Drive folder
- ‘-name’ is telling the ‘find’ command to look for file(s) based on its name
- ”Icon?” is the filename you’re looking for; in this case it’s the annoying ‘Icon?’ files that spawn outta the blue
- ‘delete’ is saying to delete the files that are found
I hope that helped you to delete Icon? files! I’ve noticed folks see them as icon\r files, as well. Delete these icon\r files. I might have to setup an automatic job to run daily. Maybe that’ll be the next blog post.