I have a Drobo to which I backup five drives using SuperDuper as sparsebundles. I also regularly compact the sparsebundles using a simple Applescript that looks like this:
However, I'd rather use grep/wildcards to compact EVERY sparsebundle on my Drobo, as I sometimes temporarily backup client drives to the Drobo as well. When I do "hdiutil compact /Volumes/Drobo/*.sparsebundle," the compact fails, as the terminal is trying to compact all of them simultaneously (which makes sense).
My question: Is it possible to write a single terminal command that sequentially compacts all sparsebundles on a drive?
Code:
do shell script "hdiutil compact /Volumes/Drobo/'Drive 1.sparsebundle'"
do shell script "hdiutil compact /Volumes/Drobo/'Drive 2.sparsebundle'"
etc...
However, I'd rather use grep/wildcards to compact EVERY sparsebundle on my Drobo, as I sometimes temporarily backup client drives to the Drobo as well. When I do "hdiutil compact /Volumes/Drobo/*.sparsebundle," the compact fails, as the terminal is trying to compact all of them simultaneously (which makes sense).
My question: Is it possible to write a single terminal command that sequentially compacts all sparsebundles on a drive?