Disk Image Automation

Is there a way to automate the "create new disk image from folder" in Disk utilities, so it can detect a newly mounted disk, perform the task, and then eject when finished?
Thanks...

Yes and no.
If you save the Automator action as a folder action and have it attached to the /Volumes/ folder then it will be launched anytime a new volume, which can include CD, DVD, camera, iPod , flash drive, network drives, external hard drives, are mounted. The Volumes folder is normally shown in the Finder. You need to do the following to make it available:
1) Go to the Finder;
2) Select the "Go to Folder..." command under the Go menu;
3) Type in /Volumes/ into the edit box;
4) Click the Go button
The Volumes Folder should mount just below Users.
Now you can access it in the Save As Plug-in... routine of Automator.
Which leads to the no part of the answer as Automator alone can't detect which of these other volumes are being mounted and would trigger the script everytime they are added. AppleScript or shell scripts are required at that point to screen the volumes and they could then trigger the Automator workflow if the right volume has been added.
You could also turn the folder actions on and off manually so they only trigger when you know that it will be the correct volume types but that sort of defeats the purpose of having them in many instances.

Similar Messages

  • Opening files on Disk Image (Automator)

    I hope this is the correct forum to post this question, please direct me to the correct one if not.
    I have successfully written several simple automator workflows, however am struggling with what I think is a very simple task.
    I am trying to write a workflow to mount a disk image and use preview to display all the files in the image. (I.e. at completion I hope to see preview open with files from the disk image available in the drawer.)
    I am not sure what to do after "Mount Disk Image" action, which completes successfully. I assume the next step is to have a finder action pass the files to the "Open Images in Preview" action.
    Which action(s) do I use to pass the files from the now-opened disk image to the OIP action?
    Mason

    After Mount Disk Image, you need three more actions:
    1) Finder action: Get Specified Finder Items <-- specify your disk image folder
    2) Finder action: Get Folder Contents <-- get the contents, you can get sub folder's contents as well
    3) Preview action: Open Images in Preview <-- open images

  • How do I make Automator unmount a disk image everytime I quit Entourage?

    I've found a way to password protest my email, by sticking my entourage data files in an encrypted disk image and then making an alias to link into that password protected disk image. My question is how do I make an Automator workflow that unmounts that disk image automatically when I quit Entourage. There has got to be a way to do this. It should be the most simple script.
    On Entourage Quit: Unmount disk image [x]
    But I can't seem to find out how to get this done.
    Can anyone help?

    Encore does have a fit-to-disc feature, called "automatic transcoding", which chooses the bit rate based upon how much media there is to encode, how much room is currently on the disc, and applying format-legal restrictions (minimum and maximum bit rates allowable by the format).
    So for instance, 30 minutes of video will never fill a disc because the required bit rate to do so would be higher than allowable by the format.

  • Automating backup to a disk image

    I've been playing with Automator to create a backup of some files (Safari Bookmarks, AddressBook items, etc). I was able to create a workflow that involved selecting these items, copying them to a folder, and then zipping that folder up. That worked fine, but I wanted to use a Disk Image instead, so I recreated the workflow as:
    Get Specified Finder Items (The Disk Image) >
    Open Finder Items (opens the Disk Image) >
    Get Specified Finder Items (The Files) >
    Copy Finder Items (copies to the Disk Image) >
    Upload Files (Transmit, uploads the Disk Image to my backup server).
    The workflow is failing on Copy Finder Items (to the disk image).
    The msg is "Couldn't create: /Volumes/MacbookProUserBackup/MacbookProUserBackup.sparseimage"
    I have already crated the disk image, and it mounts in the workflow fine, it's just for some reason Automator won't copy to it.
    Anyone have any ideas?

    I would first create a blank disc image large enough for what you need. Mount the disc image on your Desktop. Use the Restore option of Disk Utility to clone the TM backup to the mounted disc image. Do not use simple copy for this.
    Note that the largest disc image with which you can work is a dual-layered DVD that can store about 9 GBs. If your TM backup is larger than this then you cannot put it in a disc image. But you can clone the backup to another hard drive.

  • My Automator script to backup files to encrypted disk image

    Hi there. I have a question regarding Automator and Encrypted disk images. I've put together a workflow that grabs files in my home folder. My home folder is utilizing FileVault. I'm grabbing things like my iphoto library, documents folder and such. On an external usb drive I've created an encrypted disk image about 100GB. My goal is for the automator action to "successfully" mount > copy > unmount the encrypted image.
    As of right now, the script works, but gives an error at the end of the copy, not allowing a successful unmount of the dmg. Is there something I'm doing wrong? I browsed through all the files after copying and they are all there, the folder sizes match up 100%.
    I guess I could just use a program that does this, but, I find it much easier clicking on a shortcut in my dock to run the script and go away for 10 - 15 mins.
    If it would help to view the script, let me know and we'll work something out.
    Thanks

    The popup box says:
    The action "Copy Finder Items" encountered an error. Check the action's properties and try running the workflow again.
    And the Automator workflow log says:
    Can't read directory contents: /Volumes/Backup
    But as I said, clearly it works and reads/writes to the encrypted dmg because all the files are there. What I do is just select all the folders inside the drive first, and delete/empty the trash first before running the action. This is the second step once I know this is working. So that I don't have to manually delete them everytime before running the script.
    So to answer your question, the drive is empty, and the dmg is empty, allowable for a maximum 100GB of storage.
    I think it might be something to do with copying files to an encrypted disk image, but, I can't find any help anywhere on this.
    Thanks

  • Automator hangs when i try to mount a disk image

    any ideas why this happens? theres nothing wrong with the image

    i figured it out.
    it works if you pick these three options
    1) get specific finder items
    2) get selected finder items
    3) mount disk image
    for some reason i was just trying to use steps 1 and 3 without step 2 in the middle, and it would hang up then..... odd. doesnt seem very intuitive to need that step two.
    too bad i cant give myself a star hope this helps someone...

  • Can I put Network Users on a sparse bundle disk image?

    Hello! Can anyone out there help me figure out what seems to be a rather complicated feat?  I'm trying to get users to log in to client iMacs as if they were local accounts, but the user account information is stored on a sparse bundle disk image.
    Long story short, I've currently got OS X Server running network user accounts tied to Active Directory.  When the users log in, they have a sparse bundle disk image that automatically mounts on their desktop.  This has been an effective solution for some of our software that doesn't play well with Network storage, as the sparse bundle is treated like local storage by the Macs.
    However, what would be a much better solution for us is to actually have the whole user account stored on the disk image.  It's a little like the way FileVault 1 worked, except the disk image is actually stored on a network drive.  So far, as a proof-of-concept, I've been able to make this work manually: I've had to log in to a local admin user and then mount the user's sparse bundle with all their user folder contents contained within.  Then, once the user path is changed to point to the disk image, the user logs right in, everything works exactly as expected (once I got the permissions set correctly).  This method works exactly like a Network User account except that all the applications see it as local storage instead of network storage.
    The trick, though, is automating this process.  I want a user to sit down in front of any iMac, log in and go straight to their account.  It would be nice if OS X Server was able to accommodate this with a setting, but it doesn't.  So, my plan so far has been to create a generic local account with a script on the desktop that users can open to login in.  The script would then mount the network share, then mount the sparse bundle disk image, then log the user in to their "local" account on the iMac.  When they log out, there's a login hook that restarts the machine.
    So far, I'm stumbling over the fact that the sparse bundle unmount when logging out of the generic "login" account, preventing the user from logging in.  But if I leave the generic account logged in, then the loginhook to restart the computer doesn't work.
    Any feedback or suggestions would be greatly appreciated!

    IIRC, sparse images only grow as things are added, but do not shrink. Create a new one, mount the original, transfer your stuff from the original into the new one, and delete the original one.

  • Deleting Sparse Disk Image Bundle from Time Capsule

    Howdy. Thanks in advance for help on this issue to anyone kind enough to spend time answering it.
    I've got a 1TB Time Capsule which I use primarily for external file storage - it's currently got just about 120GB of files on it which I have manually copied there. I only sporadically use Time Machine to do automated backups, but since I've had the Time Capsule for a good long while, there have been many backups, and relatively little space left on it. As I am not interested in files that are 8 months old, I have gone into Time Machine and deleted all the old backups I don't want, then done a fresh backup so there's a current copy of everything on my laptop. It's my understanding that deleting backups from within Time Machine clears space off the Time Capsule, and when I did those deletions, saw that the available space on my Time Capsule did in fact increase, but not nearly as much as I would have expected.
    Now, there's a file sitting on my Time Capsule called a "Sparse Disk Image Bundle.dmg", which has a filesize of 564GB - so there's where all the "free" space on my Time Capsule is accounted for.
    My question is, if I know that I don't want the contents of all the old backups, but I DO want a copy of the files I have manually copied onto my Time Capsule, is it safe to delete the 564GB .dmg file? I use my Time Capsule more than anything else as the repository for my iTunes library, and it'd be a huge bummer if I wiped out my entire music collection by deleting that file.
    So far as I can tell, the contents of my Time Capsule and that .dmg file are separate, but I don't know enough to know whether that's really the case.
    Any advice is well appreciated!

    Hi, and welcome to the forums.
    Yes, network backups are in an odd container called a +sparse bundle.+ It should be named with your Computer name plus a string of 12 numbers and letters (the hardware address of your Mac).
    Do you see your "other" files separate from it? They shouldn't be inside it, unless you specifically copied them into it.
    As long as they're shown separately, yes, you can safely delete the sparse bundle. That will delete all your backups, though, and take quite a while. If it seems to be taking forever, see the blue box in #12 of [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum).
    There is an alternative, however. You can limit the +maximum size+ of the sparse bundle, per #A8 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum). As noted there, however, if you update to Snow Leopard, 10.6.3 or later, it will be automatically re-sized to the size of the TC's internal HD.
    If it's already too large, you may need to delete some more backups and/or "compact" it first. See the pink box in #12 of the FAQ.

  • Trying to create backup of BOOTCAMP with New Disk Image

    Hi.
    I am trying to automate backing up my BOOTCAMP partition. I thought automator might do it. I have it done but I have 2 problems.
    1) It prompts me for my password before it starts. Other folders don't ask me, how can I stop automator asking me when it is making disk image from BOOTCAMP?
    2) I get an error message Error code 28. See below. I have run this twice and get the same error message, same place each time. What is the problem.
    Thanks for your help. Much appreciated.
    !http://www.silverstoneschoolsparking.co.uk/grandprix/bootcamp%20automator%20err or.jpg!

    Thanks JGG.
    However, I see that development of Winclone has stopped which is a little concern.
    Also I do not see how to automate it. Is that possible?
    Can Winclone be added to Automator somehow, or back to the original question why is New Disk Image not happy creating an image of Bootcamp? I also tried selecting all the files/folders within Bootcamp instead of bootcamp itself, but that also fell over with same error message but at a different file.
    I use Carbon Copy Cloner for backing up Macintosh HD on a schedule, but I really want something which can back up Bootcamp on a schedule, or by using automator. How can this be achieved? Thanks
    Lee

  • Script to unmount or eject disk images

    Is there a way to unmount disk images wiuth an automator or applescript? I have such a script to eject all disks, but this won't unmount disk images. I would like something that unmounts everything, except of course the startup disk etc.

    Andrew Gara wrote:
    That works!
    However, I still have the problem that it will only eject 1 of 2 or 2 of 3 or 3 of 4 etc. I always have to run the script again to eject the remaining disk or image.
    It says: Applescript error Finder got an error. Can't get disk 3 (or whatever is remaining.)
    I really appreciate your help btw.
    this of course makes sense because once a disk is ejected it's not counted among the remaining disks. we should start ejecting from the last disk (see the script below). Also, as i found out, Finder's eject command in apple script doesn't unmount internal drives. At least it didn't for me. I' not sure what the story here is.
    One can circumvent this by calling a shell script command.
    Something along the following lines.
    tell application "Finder"
    set nmd to number of disks
    --this ejects externals and disk images
    if nmd > 1 then
    repeat with i from 2 to nmd
    eject disk (nmd - i + 2)
    end repeat
    end if
    --this ejects internals except for the start up
    set nmd to number of disks
    if nmd > 1 then
    repeat with i from 2 to nmd
    do shell script "diskutil unmount /Volumes/\"" & (name of disk (nmd - i + 2)) & "\"> /dev/null &"
    end repeat
    end if
    end tell
    I tested it on my computer and it ejects 10 disks and disk images well so I think it should work ok most of the times but there are probably situations when it will fail. I'm not sufficiently motivated to refine it.

  • Unsuccessful in creating simple Disk Image action - please help

    I am new to Automator and thought I was getting the hang of it. I am trying to create a simple action that will take my selected files, then put them into a .dmg. I want it to ask for a name and location each time. I thought I had it but every time it creates the image it self deletes. Now I am totally confused.
    I searched for "disk image" in the forum but didn't find anything.
    Thanks for any help.
    CHris

    It sounds like you are unmounting the dmg when done - what actions are in your current workflow? You can use the option to show the action when it runs to get a dialog with the selected items for you to put in the names and location.
    1) Get Selected Finder Items
    2) New Disk Image {  Options:
                Show this action when the workflow runs;
                Show only the selected items (check Volume name, Save as, in)  }

  • Nested items in docked folder inaccessible on mounted encrypted disk image

    When I click on a folder in the dock, then select a nested folder and try to open it, I get the error message:
    "The application cannot be launched. -35"
    The folders in question reside on an encrypted disk image (which is mounted). If I remove the folder from the dock and then put it in the dock again, this fixes the problem until the disk image is unmounted, and then mounted again.
    Are there any solutions? Thanks.
    iMac G5 10.5.7

    I finally discovered a quick and easy workaround for this problem.
    Using Automator and Cocktail's "built in" Automator actions, I created a script with 2 actions. The first clears the user's dock caches (using Cocktail). The second action is a shell script that relaunches the dock. The script is simply "/usr/bin/killall Dock" (case sensitive, without the quotes).
    I saved the Automator script as an application and dragged the app into my Dock. Now, all I have to do is click on the app in the dock, and click allow in the window that pops up (allowing the app to obtain the password for Cocktail from my keychain) and then the nested items then become immediately available. I don't have to reset any prefs regarding the appearance or behavior of the docked folders. Problem solved!

  • Disk Image won't automatically mount for Share iPhoto Library

    Hey All,
    I've just got a new mac and am sharing an iPhoto library between two users. I moved the iPhoto Library Folder to a DMG set it to ignore permissions.
    In each account I did the following: Hold down the option (or alt) key and launch iPhoto. From the resulting dialogue, select 'Choose Library' and navigate to the new library location. From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    The problem is that the DMG won't mount automatically mount. I set it up under both user accounts to mount at start up but it won't do it.
    Am I doing something wrong?

    Are you using fast user switching or logging out and then back in to the second account? It may be that fast user switching doesn't trigger a "startup" scenario in the second account which is necessary for the disk image to mount.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Trying to automatically mount two disk images from NAS

    I am trying to get two mac os x journaled sparse disk images to automatically mount upon login. I have tried to add the following items to my login items under System Prefs/Accounts and none of them have worked:
    1. Browse to the file and choose it
    2. Create an alias and choose the alias
    3. Mount the disk, and then browse to the mounted disk and choose it
    4. Create a symbolic link and then choose it
    Maybe I am doing something wrong, and maybe there is a different way to do it. Any ideas?

    V.K. wrote:
    I don't know what's going on here. as i said it works for me.
    try doing it using a terminal command.
    make a new workflow consisting of a single action "run shell script".
    inside the shell script put the following
    hdiutil attach /path/to/diskimage
    to get the path to the image drag it to the action window. enclose the path in quotation marks. it should look something like this:
    hdiutil attach "/volumes/dlinkroot/Volume_1/media/photos/iPhoto/imagename.sparseimage"
    If you want the image to mount a bit faster add -noverify to the command like this:
    hdiutil attach "/volumes/dlinkroot/Volume_1/media/photos/iPhoto/imagename.sparseimage" -noverify
    see if it mounts this way.
    Thanks for the quick feedback.
    That shell script option almost works. What I noticed was that /Volumes/Volume_1 which is the volume created on the dlink NAS needs to be mounted in order for the sparse images on the NAS to be mounted. Maybe the other way also I had the same issue (login items as well as automator app). It's just that I noticed it only now.
    So is there a way to ensure Volume_1 is always mounted? Adding hdiutil attach /Volumes/Volume_1 does not mount it

  • Save as disk images

    Dose anybody know how to automatically save a project as disk images? Applescript?
    Thanks in advance

    Does anybody know how to automatically save a project
    as disk images? Applescript?
    I think the answer is it can't be done. Looking over the Applescript/Automator documents, I don't see that sort of thing mentioned.
    Search http://developer.apple.com/ for Applescript
    See for example: http://developer.apple.com/documentation/AppleApplications/Conceptual/AutomatorC oncepts/AutomatorConcepts.pdf
    F Shippey

Maybe you are looking for