From terminal/LC's shell() use: lock with ..... $ chflags uchg <filename> unlock with ... $ chflags nouchg <filename> What is interesting in this connection: I got also a "compile error" from LC's "do as applescript" using a script that works from Applescript's Script Editor. MacOS 10.11.3