else if

I have an external drive that is partitioned. One of the drives is PRO FULL 1 L. I want to be able to unmount the partition if it exists and do nothing if it does not exist. I have come up with the following which works fine if the partition exists, but can't figure out what to add to script (else if?) to deal with the situation if the partition does not exist. (running Catalina )


Thanks


---PRO FULL 1 L


if exists (do shell script "diskutil unmount /dev/disk4s2") then


end if




---PRO FULL 1 L - data


if exists (do shell script "diskutil unmount /dev/disk4s1") then


end if

iMac Line (2012 and Later)

Posted on May 18, 2020 4:49 PM

Reply

Similar questions

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

else if

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.