Rixstep
 About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Learning Curve

A Brody's Brady School

The School of Beige™ be shaking in its wobbly roots.


Get It

Try It

You are welcome to bill Intuit as it appears they are the ones who have allowed the bug to escape unnoticed.

Excuse me. But I've been using Apples since the Apple ][+, which predates the first Mac, and the first Lisa. I have never been able to replace a folder with a file using the Finder. It warns against it. Intuit's typo is what allowed this to happen. Please don't use ALL UPPERCASE. It is rude. It is considered shouting on the internet. There is not reason to use it here.

Reasonable and customary is expecting everyone performs backups religiously. Anyone who doesn't might as well be parachuting without a parachute, or scuba diving without air, or running a notebook computer on an almost dead battery without a power plug ready to plug into the wall, or driving downhill without working breaks. You take responsibility for your own devices. If you don't, you can't expect anyone else to do it for you.
 - 'a brody'

Uh OK, you tosser. Try this on your ][+. It's both reasonable and customary.

set DesktopPath to (path to desktop folder) as string
set filename to "GoodStuff"
set filepath to DesktopPath & filename

display dialog "Let's make a folder:
" & ((path to home folder) as string) & filename buttons {"Yes", "Cancel"}
    default button "Cancel" cancel button "Cancel"

if button returned of the result is equal to "Yes" then
    tell application "Finder"
        make new folder at (path to home folder) with properties {name:filename}
    end tell
end if

display dialog "That was great, now put something you want to disappear forever inside
" & ((path to home folder) as string) & filename buttons {"OK"}

display dialog "Let's make a file of the same name on the desktop
 " & DesktopPath & filename buttons {"Yes", "Cancel"} default button "Cancel" cancel button "Cancel"

if button returned of the result is equal to "Yes" then
    tell application "TextEdit"
        make new document at the beginning of documents
        close document 1 saving yes saving in filepath
    end tell
end if

display dialog "Done. Now are you ready to replace
" & ((path to home folder) as string) & filename & " with
" & filepath & "?" buttons {"Yes, Please", "Cancel"} default button "Cancel" cancel button "Cancel"

if button returned of the result is equal to "Yes, Please" then
    tell application "Finder"
        activate
        move (filepath as alias) to (path to home folder) as alias with replacing
    end tell
end if

Thanks to the brunerd for sweating the details when he actually has more important things to do than bitch-slap fanboys.

See Also
Industry Watch: The QuickBooks Disaster
Industry Watch: Apple Redact, Close Down Intuit Thread

Apple's File System APIs
Developers Workshop: Y.G.B.K.
Hotspots: Leopard: OS Xhumation
Developers Workshop: performFileOperation:
Hosing OS X with Apple's Idea of 'Expected Behaviour'
Learning Curve: Rebel Scum: More Attacks on 'Expected Behaviour'

Apple: NSWorkspace Reference
Apple: NSFileManager Reference
Slashdot: Data Loss Bug In OS X 10.5 Leopard
Tom Karpik: Massive Data Loss Bug in Leopard
MacInTouch: Mac OS X 10.5 Leopard: Finder Data-Loss Bug

Learning Curve: 4893378 FAQ
Industry Watch: Sanity Checks at Apple
Learning Curve: A Sanity Check for Apple
Learning Curve: 4893378: 'Expected Behaviour'

Apple Support Discussions: Desktop GONE
QuickBooks Community: QUICKBOOKS UPDATE DELETES DESKTOP

About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.