Code covered by the BSD License  

Highlights from
ParallelC

from ParallelC by Geoffrey
This file allows you to access a virtual Parallels drive while running Matlab on a MAC OSX.

ParallelC.m
% This script changes your MAC OSX Matlab directory to a virtual drive C:\
%
% File Created by Geoff Recktenwald
%                 Cornell University
%                 Fri. Nov 13, 2009
%
% File Name: ParallelC    ( Ver 0.0 )
%
% This file allows you to quickly access virtual Parallels drive while 
% running Matlab on a MAC OSX.5.  
%
% Parallels creates a directory in '/tmp' that provides access to any 
% virtual drives. This directory is always numeric and changes whenever
% parallels is restarted.  Thus, the code must be smart enough to find the
% proper directory.  This code supplies two methods for achieving that aim.
%
%
% Additional Comments:
% 1. R(n).name will contain the directory title of the Parallels handle in
%    MAC OS.
% 2. I use this script as a shortcut so it is accessable from any location.

 R=dir('/tmp');                             % Get directory names
 for n=1:length(R),                         % Scan through directory names
    R1=exist(['/tmp/', R(n).name, '/C/']);  % See if the directory exists.
    if R1==7,                               % Exist returns 7 if A is a directory
     eval(['cd /tmp/', R(n).name, '/C/']);  % Go to the appropriate directory
    break, end                              % Program is finished
 end

% COMMENT: You can replace '/C/' with any existing windows directory string
%          (ex.'/C/Matlab/R2009b/Work')
%          (ex.'/C/''Program Files''/Matlab/R2009b/Work')







% ---- ignore all code below this line --------  2nd method  -------------
%
% The second method relies on Parallels use of numeric directory names
% This method is definitely not as robust.
%
%  R=dir('/tmp');                  %Get Directory names
%  for n=1:length(R),              %Scan through directory names
%      R1=regexp(R(n).name,'\D');  %Find the first directory name that is only numeric.
%      if isempty(R1), break, end  %Break the loop if only numeric
%  end
%  eval(['cd /tmp/', R(n).name, '/C/']) % Go to the appropriate directory

Contact us at files@mathworks.com