Preview of .sql Files.

Hello.

On Finder, I can preview all .txt files (a small reproduction of the file's contents). But by default, it is not possible for .sql files. On the preview window, I can only see the file's icon.

How can I make it possible, since for me, .sql files are just text files, with a different extension (instead of .txt, it has .sql extension).

Another question: is it possible to change the icon for all files from a specific type (ex. all .sql files)?

Thanks in advance

Carlos

MacBook Pro; Mac mini, Mac OS X (10.6.2)

Posted on Jan 14, 2010 10:11 AM

Reply
4 replies

Jan 14, 2010 11:19 AM in response to Carlos Inglez

use this link to make quicklook treat .sql files as plain text files
http://www.macosxhints.com/article.php?story=20071028184428583

icons for a specific file type are set by the application which is currently the default application for that file type. if you change the default application the icons will all change. you can also change the icon used by the current default application. go to the main Applications folder, locate the application in question, control-click on it and select 'show package contents". then go to Contents->Resources. find the .icns used by the application and replace it by your own .icns file. restart.

Jan 15, 2010 2:38 AM in response to V.K.

Thanks for the reply.

The solution for changing the icons did not work. I changed the default application for a .sql file, including the "Change All" option, and no icons have changed.

The only way I have seen so far to change an file's icon is copy/paste on the "Get Info" window. But this way I must change for each file individually. Not a good way to do so.

Maybe there is a difference between 10.5 and 10.6??

Carlos

Jan 15, 2010 7:43 AM in response to Carlos Inglez

as barney says, the application needs to be registered with launch services as being able to handle .sql files. if it isn't then setting it to be the default app for this file type will not be enough to change the icons.

so select the application again, control-click and select "show package contents". go to Contents. you want the file info.plist sitting inside. open it with a text editor and add an entry for extension sql to one of the file types that it can handle. then launch the default application and change the app set to open .sql files to this app as described earlier. this should change the icons.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Preview of .sql Files.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.