MacOS – How to restore a hidden file in Time Machine – can’t find data file

macostime-machine

I followed the instructions in this question but still cannot restore my address book and iCal data. I found what I thought was the data file for the address book, AddressBook-v22.abcddb, but when I tried to import it, Address Book didn't recognize it as a valid importable file. What is the filename of the correct file to import from my TM backup? And I couldn't find anything that looked like an iCal data file.

My back story is that my hard drive crashed on my iMac, and I brought home a new Macbook Air to replace it. I'm just trying to copy my Address Book and Calendar data from my external hard drive backup to the Macbook.

Best Answer

Open Applescript Editor, in Applications > Utilities then copy/paste this to a new script...

set newHiddenVisiblesState to "YES"
try
    set oldHiddenVisiblesState to do shell script "defaults read com.apple.finder AppleShowAllFiles"
    if oldHiddenVisiblesState is in {"1", "YES"} then
        set newHiddenVisiblesState to "NO"
    end if
end try
do shell script "defaults write com.apple.finder AppleShowAllFiles " & newHiddenVisiblesState


tell application "Finder"
    set theWindows to every Finder window
    repeat with i from 1 to number of items in theWindows
        set this_item to item i of theWindows
        set theView to current view of this_item
        if theView is list view then
            set current view of this_item to icon view
        else
            set current view of this_item to list view

        end if
        set current view of this_item to theView
    end repeat
end tell

Then Save as an application, which you can then just double-click to toggle showing/hiding invisible files.

You don't need to kill the Finder for this toggle, a refresh is sufficient - & faster.