[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Tao Effect Forums • View topic - Lock all folders via Terminal
Page 1 of 1

Lock all folders via Terminal

PostPosted: Sat Apr 10, 2010 10:13 am
by lnealan
Espionage doesn't seem to have an applescript dictionary and I'd like to be able to automate "lock all folders". Is there a way to invoke this behavior via the terminal?

Re: Lock all folders via Terminal

PostPosted: Tue Apr 13, 2010 9:05 pm
by greg

Re: Lock all folders via Terminal

PostPosted: Tue Apr 13, 2010 9:10 pm
by lnealan
Thanks for your reply and pointer! I did realize that for now hdiutil is the only way to go. Since I'm trying to trigger a backup I first run an applescript that quits all the running applications that I have associated with any Espionage folders. Then I run this:

# Lock all folders
mount | grep EspionageMounts | cut -d' ' -f 3- | cut -d'(' -f 1 | xargs -I {} diskutil unmount {} &>/dev/null

Re: Lock all folders via Terminal

PostPosted: Tue Apr 13, 2010 9:18 pm
by greg
Ah neat. I assume you're using some third-party tool for the backup? (Just as an FYI, though you probably already know, Espionage's built-in backups will properly backup the folders regardless of whether they're locked or unlocked.)

One other tip I'd give is to make sure to wait a little bit after all the applications have quit before running that command. Espionage will wait 3 seconds after it detects that an application is no longer running before locking the folder, this is so that application auto-updaters (which quickly quit and relaunch an application) work properly.

Re: Lock all folders via Terminal

PostPosted: Sat Jun 05, 2010 10:57 am
by TomEck
Interesting discussion but a bit over my head or better coding experiences. Is there a simple apple script or terminal code that would allow me to unlock or lock a specific folder or all folders? I would like to use Launchbar to unlock and lock folders. Perhaps it would be possible to tell the Espionage helper via a apple script to lock/unlock a folder? Or could I even assign a keyboard shortcut?

Thanks,
Thomas

Re: Lock all folders via Terminal

PostPosted: Sun Jun 06, 2010 3:00 am
by greg

Re: Lock all folders via Terminal

PostPosted: Mon Jun 07, 2010 9:11 am
by TomEck
Of course I can open the folder and bring up the password prompt but that means I have to open a Finder window. What I want to do is to access the folders inside LB and that only works when the folder is unlocked. LB is whitelisted for the reason that I don't want a password prompt any time LB want to index the folder or the folder is part of a search result in LB (for the same reason I don't use Application Association). That means I can look through LB into a locked folder but I see only the three folders "This folder contains encrypted data...". Is there a way to unlock a folder other than to open the folder via LB through the Finder?

LB shows me locked and unlocked folders (most of the time; the mentioned problem with symbolic links still exists...) but a unlocked folder seems not properly recognized as a volume even it is listed under volumes. I am not able to eject such a volume.

Re: Lock all folders via Terminal

PostPosted: Mon Jun 07, 2010 6:50 pm
by greg
Thanks Thomas, we see what you're seeing as well, for some reason LaunchBar can't eject Espionage's volumes (I'm not sure why, this is a question you'll want to ask its developers). We'll look to see what we can do to improve Espionage's compatibility with LaunchBar. In the future you'll probably be able to use Espionage's "Lock Folder" service to lock unlocked folders from LB. Unlocking a folder from LB might take longer though.

Re: Lock all folders via Terminal

PostPosted: Tue Jun 08, 2010 8:38 am
by TomEck
Thanks for the response, Greg. I am glad that you will take a closer look. I have posted a similar information in the . Thanks again!