Copy all folders to another volume

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

Hi,

AppleScript works only with HFS paths (colon separated)


.
	move folders of folder sourceFolder to disk "NIKON"
.

Thanks StefanK,

Its works perfectly!

If I understand what you are saying Applescript works with “:” and shell script works with “/”.

Therefore the POSIX is only required when you intend to perform Shell script command. If you always stay in Applescript you should not used “/” it will not work.

Am I right?

Daniel

exactly