How-To: ‘Gray out’ Files in Finder

When copying files in Finder, you might have noticed that the newly created, still-being-written-to files are ‘grayed out’, conveniently informing the user that the file is not ready yet.

Greyed out files in Finder

I wanted to replicate that for an upcoming upgrade of Transloader (along with a progress indicator, as you can see in the screenshot above, but that’s another topic), and after trying a couple of things, I found out how to do it.

I tested this on macOS High Sierra only, since it’s the OS version I’m targeting right now, but I don’t see a reason why it wouldn’t work on earlier versions of macOS.

It’s All in the Date

After digging around on the internet, I found that all that needs to be done is to change the file’s creation- and modification dates to one specific date, namely:
January 24th, 1984, 09:00:00 AM

Setting the creation and modification dates of the file to be greyed out

And it works great – the created file appears ‘grayed out’ in Finder.

There’s a downside, however:
When copying a file in Finder, and trying to move that still-being-written-to file, Finder will display a convenient message that tells the user the file is in use and moving it might cause problems.
This doesn’t happen when using this date-setting approach.

So I kept digging.

The Solution

What I did, then, was use Terminal and the ‘mdls’ command to list the meta data of the still-being-written-to file:

mdls in Terminal on a copying file

At first, coming from the date-approach, I noticed the kMDItemFSCreationDate item, stating
1904-01-01 00:00:00 +0000

However, setting that as the creation date does nothing at all.

Then, I noticed the kMDItemFSCreatorCode and kMDItemFSTypeCode fields (red arrows in the screenshot of Terminal above).

Setting those like this…

Setting creator and type codes in Objective-C

…does exactly what I wanted – it ‘grays out’ the file in Finder, and displays the convenient Finder error message when trying to move it:

Finder error message when trying to move a still being written to file

Mission accomplished – we’re done!

Please keep in mind, though, that the user may still choose “Continue” to move the file, so you should definitely use an NSFileCoordinator to take care of that.

ScreenFloat v1.5.14 released – Maintenance Update

2 ScreenFloat Icon 3  dragged

I’m happy to announce the immediate availability of ScreenFloat v1.5.14 – an admittedly long overdue maintenance update that fixes a couple of issues:

  • A semi-rare crash, that occurred when dragging the mini-icon of a floating shot, was fixed
  • Cancelling a mini-icon-drag by pressing ‘esc’ actually works now
  • Fixed a bug where a cleared keyboard shortcut would reset to its default after a restart of the app
  • Fixed an interface bug where, after sharing a shot, the standard window buttons would appear on the floating shot
  • Fixed a bug where the app would seemingly freeze when “Save as…” and “New Folder” was selected

What’s ScreenFloat?
ScreenFloat lets you take screenshots that float above all windows, so as to keep information always visible (following you around different spaces, windows and full-screen apps).

  • Need to transfer bank account information from a mail to your online banking tool? ScreenFloat!
  • Want to keep a reference image visible? ScreenFloat!
  • Want to just remember a bit of information for a minute? ScreenFloat!
  • The use-cases seem endless (and *are* endless – believe me, I use it all day, all the time 😉 )

While the main “raison d’être” is this floating functionality, ScreenFloat offers a Shots Browser that keeps all the screenshots you take in a neat library you can curate (via titles, tags and (smart) collections).

Each floating shot has a draggable mini-image-icon at the lower left, so you can quickly drag any screenshot you take to other apps, like Messages, Mail, or Twitter, for example.

Links:
ScreenFloat Website (with free, 15-day trial)
ScreenFloat on the Mac App Store

What’s Next?
Looking ahead, I’m working on a substantial v2.0 upgrade of ScreenFloat which will include features like annotations and sync (via iCloud), and I’m also looking into an iOS companion app down the road.
So, although there haven’t been a lot of updates lately for ScreenFloat (mainly because Yoink has been keeping me very busy), I do have lots of plans and love for the app.

 

Eternal Storms Software Logo

 

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you 🙂

Yoink for Mac and iOS – Updates

What’s Yoink?

Yoink is an app for Mac, iPad and iPhone that speeds up your daily workflow by simplifying and improving drag and drop.
It accepts almost anything you can drag and stores it for you for later use, like a shelf to temporarily “hold something” for you.

Yoink for Mac Update + SALE (25% off!)

Yoink v3.4.2, available now on the Mac App Store, is a minor maintenance update recommended to everyone using the app.
The update brings improved compatibility with Firefox, Sketch and upcoming versions of Safari, as well as more reliable fetching of favicons (in, where possible, higher resolution) for URLs saved in Yoink.

As I’m sponsoring this week’s AppStories Podcast Episode, Yoink for Mac is – for the entirety of the week – on sale, about 25% off its regular price!

Links:
Yoink for Mac Website (with a free, 15-day trial)
Yoink for Mac Usage Tips
Yoink on the Mac App Store (25% off for the week)

Yoink for iPad and iPhone Update

Yoink v1.1.1, available now on the App Store, is also a maintenance update, albeit a larger one.

Among the more than 30 changes, improvements, bug fixes and new features in this update, version 1.1.1 brings:
– Live monitoring of your clipboard when used in Side-by-Side or Slide-Over mode
– Yoink’s Today Widget now offers a way to access all of Yoink’s items, instead of only the 3 most recent ones
– Improvements for item previews
– Downloads now show their progress in percent
– Improved reliability of all of Yoink’s extensions (the keyboard, Today Widget, Action/Share extension and File Provider)
– Fixed many (more or less rare) crashes in Yoink and its extensions

Links:
Yoink for iPad and iPhone Website
Yoink for iPad and iPhone Usage Tips
Yoink on the App Store

Video of Yoink’s new “live clipboard observer”

Video of Yoink’s updated Today Widget

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you 🙂