Simple MOVE problem

Hey All,

Can anyone tell me why when I run this script, I get the message:

The Script is as follows:

global myfolders
global zip_upload

set myfolders to choose folder
set myfolders to result
set zip_upload to ((path to desktop) as string) & "FTP:Sent to FTP"

tell application "Finder"
	set all_folders to every folder in myfolders
	repeat with a_folder in all_folders
		my fileZipper(a_folder)
	end repeat
end tell

on fileZipper(a_folder)
	if (a_folder as text) ends with ":" then
		set myDelimiters to AppleScript's text item delimiters
		set AppleScript's text item delimiters to {":"}
		set a_folder to (text items 1 thru -2 of (a_folder as text) as text)
		set AppleScript's text item delimiters to myDelimiters
	end if
	set zipFile to (a_folder & ".zip") as text
	do shell script "/usr/bin/ditto -c -k -rsrc --keepParent " & (quoted form of (POSIX path of a_folder)) & " " & (quoted form of (POSIX path of zipFile))
	return zipFile
end fileZipper

tell application "Finder"
	move (files of folder myfolders whose name extension is "ZIP") to zip_upload
end tell

Thanks, any help would be greatly appreciated!

Jase

Jase,

I don’t do anything with ftp stuff, but this appears to me that you’re attempting to make two folders at the desktop: one with the name FTP and the other with the name Sent to FTP. If that is what you’re attempting, try this.

tell application "Finder"
	make new folder at desktop with properties {name:"FTP"}
	set zip_upload to result
	make new folder at zip_upload with properties {name:"Sent to FTP"}
end tell

Hope this helps.

PreTech

That will fail if “~/Desktop/FTP” or “~/Desktop/FTP/Sent to FTP” already exist.

tell application "Finder"
	if not (exists folder "FTP" of desktop) then
		make new folder at desktop with properties {name:"FTP"}
	end if
	if not (exists folder "Sent to FTP" of folder "FTP" of desktop) then
		make new folder at folder "FTP" of desktop with properties {name:"Sent to FTP"}
	end if
end tell