I have a subdirectory on my MacBook which contains all folders, subfolders and files I want to copy onto an SDHC card.
The information found under /Users/DanielPaquin/NIKON/SD Structure/ has to be copied onto a SDHC card call NIKON.
I’ve created this little script which first reformat the disk and then copy the information. The reformatting work perfectly, however I get the following error message when running the script : Error -1728 It is impossible to obtain every folder of “/Users/DanielPaquin/NIKON/SD Structure/”
I did not find anything about error -1728 in the "Error Numbers and Error MessagesM manual found at http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_error_codes.html
Would someone know what this error mean?
Thanks in advance!
Daniel
--formatSDHC NIKON
do shell script "diskutil eraseVolume \"MS-DOS FAT32\" NIKON /Volumes/NIKON"
set SourceFolder to (path to home folder as text) & "NIKON:SD Structure:"
set POSIXsourceFolder to POSIX path of SourceFolder
display dialog POSIXsourceFolder
tell application "Finder"
try
move folders of POSIXsourceFolder to "/Volumes/NIKON/"
on error errMsg number errNum
display dialog "Error: " & errNum & return & errMsg
end try
end tell