Dear All
I am trying to make a script that mounts a DMG image file, then moves the entire contents of a folder to a folder in that DMG image, ejects the volume and then deletes and secure erases the contents of the original folder.
I have got this far:
do shell script "hdiutil mount '/Users/Mat/Documents/Vault.dmg'"
tell application "Finder"
set sourceFolder to "/Users/Mat/Downloads/Portal"
set targetFolder to "/Volumes/Vault2/From Portal"
move entire contents of sourceFolder to targetFolder
eject "Vault2"
end tell
So i can mount the file and it ejects ok but when it trys to copy the files into the folder it returns
Result:
error “Can’t get entire contents of "/Users/Mat/Downloads/Portal".” number -1728 from «class ects» of “/Users/Mat/Downloads/Portal”
I’m a bit confused and any help would be much appreciated.
Ive not even started to figure out the secure erase of the source yet.
Thanks in advance