Skip to main content

Questions tagged [finder]

The Finder is the default file manager used on Mac OS and Mac OS X operating systems.

Filter by
Sorted by
Tagged with
682 votes
14 answers
667k views

Open terminal here in Mac OS finder [closed]

Is there something similar to the "Open Command Window Here" Windows Powertoy for Mac OS? I've found a couple plugins through a google search but wanted to see what works best for developers out there....
Abdullah Jibaly's user avatar
200 votes
12 answers
110k views

Open a folder in vscode through Finder in macOS?

On my windows pc, I would just double click a folder and click "Open in VS Code" to a open a folder, which saved time for me when looking through lots of code online. With Mac, however, I do ...
anshul's user avatar
  • 2,931
50 votes
8 answers
30k views

How to Write OS X Finder plugin

I'm looking for a guide or sample code for writing Mac OS X Finder plugins? It would like to know how to do some simple actions: adding image overlayers to icons adding context menu items listen to ...
notnoop's user avatar
  • 59.1k
45 votes
8 answers
12k views

Launch Finder window with specific files selected

I'm trying to programmatically launch an OS X Finder window from an Xcode project. I need the window to open to a specific folder and have specific files within that folder automatically selected. ...
simon.d's user avatar
  • 2,491
31 votes
3 answers
14k views

Show folder's contents in finder using Swift

I want to be able to select a folder and show its contents in the Finder. I have managed to select the folder itself and select a file within the folder. But I don't know how to show the contents of ...
iphaaw's user avatar
  • 7,044
31 votes
2 answers
1k views

Howto add menu item to Mac OS Finder in Delphi XE2

I'm working on Delphi XE2 application targetting Mac OS and Windows. And I want to have integration into context menu. For windows this is simple task. But for Mac OS I dont know how to do this. I've ...
GothAr's user avatar
  • 503
30 votes
9 answers
69k views

Ways to invoke python and Spyder on OSX

I recently bought a MacBook and install Python on it via Anaconda. Here's the version information: Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09) [GCC 4.0.1 (Apple Inc. ...
kuzzooroo's user avatar
  • 7,148
27 votes
2 answers
5k views

OS X: strange -psn command line parameter when launched from Finder

Our OS X Java application which is launched by a shell script inside the MyApp.app bundle gets a strange command line parameter -psn_0_989382 when launched from the Finder, but not when launched ...
Mot's user avatar
  • 29.2k
26 votes
7 answers
9k views

What is the quickest way to toggle hide/show hidden files on a Mac OS X Yosemite?

I'm on Yosemite, and I want to toggle hide/show all the hidden files on a Mac. Every-time, I want to do that I have to go to Terminal.app and run these command : To show defaults write com.apple....
iori's user avatar
  • 3,396
24 votes
4 answers
8k views

Implementing "Show in Finder" button in Objective-C

In my application I would like to create a 'Show in Finder' button. I have been able to figure out how to pop up a Finder window of that directory but haven't figured out how to highlight the file ...
Locksleyu's user avatar
  • 5,352
24 votes
4 answers
13k views

Adding buttons to Finder toolbar?

Dropbox has the option of adding a button to the Finder toolbar. It even appears in the 'Customize Toolbar...' window.   I can't find any documentation on how this sort of thing is done.... Does ...
cannyboy's user avatar
  • 24.3k
21 votes
1 answer
20k views

Remove spaces from filenames in folder

I have a situation where I need to daily go over 400+ files in a folder on Xsan and replace spaces with under-scores in the filenames of the files. Does anyone one have a script at hand that I can ...
Ronny vdb's user avatar
  • 2,444
20 votes
4 answers
52k views

Applescript: Open a Folder in Finder

I m trying to open a folder in Finder using AppleScript. The following is my code. I want the folder WorkSpace to open in Finder, but it opens the Parent Folder /Volumes/MyMacDrive/Mani and highlights ...
Manikandaraj Srinivasan's user avatar
15 votes
3 answers
24k views

Set position of window with AppleScript

I'm trying to set the position of the Messages.app chat window using AppleScript. tell application "System Events" set position of window 1 of application "Messages" to {100, 100} end tell With ...
DrummerB's user avatar
  • 40.1k
15 votes
2 answers
7k views

Mac OS X 'compress' option vs command line zip (why do they produce different results?)

I noticed that the command line 'zip' tool and Mac OS X's 'Compress XXX' option (available via right click in finder) are giving different output files. Not only is the size of the file a few hundred ...
Locksleyu's user avatar
  • 5,352
14 votes
4 answers
5k views

Icon for Mac OSX bundle

I compile a Mac OSX bundle, called MyBundle.bundle, which is used as a plugin for another application. I want the bundle have a unique icon and so I set the Info.plist file to say: <key>...
Periodic Maintenance's user avatar
14 votes
2 answers
938 views

my system refuses to shut down/restart with NSAppleScript class

I am using CFPlugin for contextual menu and icon overlay on 10.5(same as scplugin). For communication between my application and finder , i am using distributed object. After installing my plugin ...
13 votes
3 answers
20k views

Adding a script to MacOS finder contextual menu

I want to add an option to the finder context menu that calls hg add %1 with %1 being the full path of the selected file in finder. Of course there are more useful cases I can think of, to add to the ...
Petruza's user avatar
  • 12.1k
12 votes
9 answers
31k views

Applescript: Get filenames in folder without extension

I can get the names of all files in a folder by doing this: tell application "Finder" set myFiles to name of every file of somePath end tell How can I change the strings in myFiles so that they ...
Svish's user avatar
  • 156k
12 votes
5 answers
6k views

getting and setting mac file and folder finder labels from Python

I have been trying to find out how to get and set the colour of file labels from python. The closest thing I've found to a solution was this, but I can't seem to find the module macfile anywhere. Am ...
GP89's user avatar
  • 6,690
11 votes
6 answers
11k views

Tagging files with colors in OS X Finder from shell scripts

One can tag files and folders with a color in the Mac OS X Finder. Is there a way to do this from a shell script?
Ralf Ebert's user avatar
  • 3,968
11 votes
1 answer
6k views

NSTableView and drag and drop from Finder

I'm trying to implement drag and drop from the Finder into an NSTableView of my app. The setup uses an NSTableView, an array controller which acts as a datasource using Cocoa bindings to a Core Data ...
Roger's user avatar
  • 4,747
10 votes
6 answers
13k views

How does the DropBox Mac client work?

I've been looking at the DropBox Mac client and I'm currently researching implementing a similar interface for a different service. How exactly do they interface with finder like this? I highly ...
Brian Gianforcaro's user avatar
10 votes
4 answers
13k views

Xcode 4.3.2 show hidden files

I am using Xcode 4.3.2 and I am trying to add some SDK references to my project. I can SEE the files using Finder, as I used the terminal script to view hidden files. Yet, when I go to my user home ...
Darren Mackiewicz's user avatar
10 votes
4 answers
5k views

How to run an Android Studio project directly from the Finder?

How to open an Android Studio project from the Finder? I see the below list of files. Is it possible to double-click one of them to get it opened by Android Studio?
brainray's user avatar
  • 12.8k
10 votes
4 answers
34k views

Change all file icons with same type [Yosemite]

I have many excel files in my computer, and the icon of all of them are plain paper, like this: I want all icons to be .numbers icon. Do anyone know how to do that ?
Mohammed's user avatar
  • 1,493
10 votes
1 answer
2k views

Unable to add item in Finder's contextual menu using services in Cocoa

I would like to add an item in my Finder's contextual menu whenever I right-click on files or folders, and this menu being linked to a method of my Cocoa app. I am following CocoaDev's example and ...
Laurent Crivello's user avatar
10 votes
3 answers
7k views

How can I implement gesture recognizers in OS X?

I have done quite a bit with gesture recognizers for iOS, but I am now doing work in OS X, and I am lost. I want to duplicate the functionality that exists like in Finder where you can two-finger ...
Westley's user avatar
  • 1,143
10 votes
2 answers
2k views

DAO pattern and the Open-Closed Principle

I've seen and worked with a lot of older, JDBC-based DAO code that usually start out with CRUD methods. My question relates specifically to the retrieval methods, or 'finders'. Typically what I find ...
user avatar
10 votes
0 answers
269 views

Is there a way to prevent Finder window from popping up when executing a Mac app action extension?

I recently added a few action extensions to my Mac app. They work fine and I display their UI and progress in a dedicated window. For some reason though, Finder also open a window where it displays ...
OldManMcDonalds's user avatar
9 votes
2 answers
17k views

Getting Finder's current directory in AppleScript stored as application

I have tried to make an AppleScript that is supposed to read the current directory from Finder and run a shell command on it. If I navigate to the desired folder in Finder and run the script from ...
Jørgen's user avatar
  • 9,030
9 votes
5 answers
5k views

How do I handle multiple file drag/drop from Finder in Mac OS X 10.5?

I need to get the URLs of all files dragged/dropped into my application from Finder. I have a Cocoa app running on 10.6 which does this by using the new 10.6 NSPasteboard APIs which handle multiple ...
robottobor's user avatar
  • 11.7k
9 votes
2 answers
12k views

Creating an automator service to create a new document in the current directory

so I'm trying to create a service that will be located in the contextual menu of the Finder and that would allow to create a new document in the current directory. I've been doing that using ...
guitio2002's user avatar
9 votes
5 answers
5k views

Set Minimum width to 320px on Mac OSX

Is it possible to set a min width for an OSX window to 320px? The default min width in Safari is greater than this which makes it difficult to program with media queries and replicate on OSX. Please ...
SparrwHawk's user avatar
9 votes
1 answer
564 views

How to make a "downloading" icon in the Finder on Mountain Lion 10.8?

Starting in OS X 10.8 Mountain Lion, Safari creates a dynamic icon while downloading a file, as shown below: : The progress bar shows the progress, and clicking the upper-left close button tells ...
Yuji's user avatar
  • 34.2k
8 votes
5 answers
3k views

Swift 3: Set Finder label color

I'm trying to set the colored labels shown by the finder. The only function I know is setResourceValue. But this needs localized names! I could image my mother language and english as well, but all ...
Peter Silie's user avatar
8 votes
6 answers
6k views

Force item icon refresh in Finder 10.8.2

Can anyone lead me to any useful link for forcing file icon refresh in new 10.8.2 version of Finder? I'm working on this problem for last few days and I have tried almost any solution which can be ...
user2381688's user avatar
8 votes
2 answers
10k views

Relative file paths with Applescript

I'm trying to make an Applescript that will open a file on a user's computer without knowing the hard drive or user name, presuming the file is in the same place in the user directory. tell ...
Calion's user avatar
  • 253
8 votes
4 answers
8k views

Nodejs module to find files?

I search a module to find files in nodejs. I would like something like: var finder = require('finder'); var path = finder.find('/path/to/*.js'); Then path is an array with for example: /path/to/...
Charles's user avatar
  • 11.6k
8 votes
1 answer
2k views

How to implement a virtual filesystem on macos?

I have seen that some applications are able to represent themselves as external disks within Finder on MacOS. Typically, these are cloud storage applications such as PCloud Drive and WD Discovery. I'm ...
William Rosenbloom's user avatar
8 votes
2 answers
8k views

How to use Mac Finder to list all aliases in a folder

I downloaded a repository from Bitbucket.org as a zip file and unzipped it using iZip to my Mac. Xcode found many compile errors because the zip or unzip did not preserve aliases properly. So I used ...
KenM's user avatar
  • 643
8 votes
1 answer
1k views

Has any program used .DS_Store (or the like) for something useful?

There is a lot of talk about how to exclude, ignore, or delete .DS_Store files on macs. It seems these small files contain data about folders that is used by Finder: http://en.wikipedia.org/wiki/....
Alec Jacobson's user avatar
8 votes
8 answers
408 views

How do I write a Rails finder method where none of the has_many items has a non-nil field?

I'm using Rails 5. I have the following model ... class Order < ApplicationRecord ... has_many :line_items, :dependent => :destroy The LineItem model has an attribute, "...
Dave's user avatar
  • 17.2k
8 votes
1 answer
359 views

Disable NSService context menu for multiple files selected in Finder

I use a NSService for my application: the user runs it from the Finder context menu. I need to disable this NSService's context menu button for multiple selections. Is this possible?
Demens Deum's user avatar
8 votes
0 answers
206 views

How to make a Finder Sync Extension change badges in response to outside events

I have a Finder Sync Extension that will display a badge on a file based on the state of a local database. It's straightforward enough to query this database in the requestBadgeIdentifierForURL ...
Steve Broberg's user avatar
7 votes
9 answers
19k views

How to make a script to show/hide hidden files in Mac OS X?

I just got my MBP with Retina and i'm really new to the Mac OS X (using PC before). I noticed that the Mac doesn't have a GUI to show/hide hidden files like Windows. I've researched and saw this site ...
daremigio's user avatar
7 votes
3 answers
6k views

How to launch the default (native) application for a given file from Java?

I am displaying a list of files; i.e. xls, doc, pdf, odt etc., in my Java application (Eclipse RCP). When the user clicks on the file, I want to launch the appropriate (according to what the OS ...
Thilo's user avatar
  • 261k
7 votes
4 answers
5k views

Add badge icon overlay to Finder icons and folders?

When we open Dropbox folder, we can see icon on the left bottom of the folder. I am developing an application in which i also want the same behavior. If folder is syncing then it will show sync icon ...
Parag Bafna's user avatar
  • 22.9k
7 votes
2 answers
4k views

Yosemite Finder Sync simple example

I am trying to create a simple (ie. Hello World) example of Yosemite's Finder Sync. That link has a tutorial, but does anyone know where the source is? Or if they have their own barebones example? ...
mingxiao's user avatar
  • 1,742
7 votes
1 answer
4k views

How to make Finder 'Open With' work for my application (Xcode, OS X)?

I have created an application that is capable of playing audio files. This in itself works fine, and so does drag&drop from finder to my application. What I would like as well, is that people can ...
Adion's user avatar
  • 589

1
2 3 4 5
16