I need (because it will make life much easier) to be able to select a folder and then have it mount on the desktop as a Volume or Partition using Applescript!
Effectively making it a ‘virtual drive’!
Rather like the “subst” commandline action on Windoze!
Example
folder = “/Library/junk/bingo” where “bingo” is the folder I want to mount
I want to mount it as “/Volumes/hello” (note change of name!)
You could use the CLI to Disk Utility to make a disk image from the folder, delete the folder, then mount the disk image. You could also do the reverse later to copy the contents of the image back to the folder then unmount the disk image and delete it. I’m not sure what the code to do it is but that should work. Any takers?
You can create a disc Image that is both read/writable for your volume. Once you have it created, you can mount it and read/write to this “mounted volume”. When you eject the disk, the changes will save to the disk image.
If you needed it always on your desktop, you can write an applescript to mount the image, but you shouldn’t have to script the creation over and over.