Fetch script

I would like some help in adding to this script. What I need added is for it to upload pdf files from a folder named “PDF” that is located in our Editorial server. so it would look like “Editorial:PDF”

Any help is greatful

-Dusty

set {year:y, month:m, day:d} to (current date)
set theDate to (y * 10000 + m * 100 + d) as string
--set theSourcehome to alias "Macintosh HD:Users:comp1:Desktop:Main EPS Pages:"

set These_PDFS to {}
tell application "Finder"
	set thesefolders to folders of theSourcehome whose name ends with " Section"
	repeat with i in thesefolders
		try
			set These_Files to (files of folder "out" of i whose name extension is "pdf")
			repeat with j in These_Files
				set end of These_PDFS to j as alias
			end repeat
		end try
	end repeat
end tell

set myurl to "ftp://prepress:@ftp.greeleytrib.com/FTP_User_Folders/tecnavia/"
if These_PDFS is not {} then tell application "Fetch 4.0.1"
	with timeout of 3600 seconds
		open URL myurl
		make new remote directory at beginning with properties {name:theDate}
		open remote directory theDate
		put into transfer window "[url=ftp://ftp.greeleytrib.com]ftp.greeleytrib.com[/url]" item These_PDFS format Automatic without uniquename
	end timeout
	quit
end tell

You don’t tell us what’s going wrong

also, you may want to dump Fetch for your AppleScripting needs. cURL seems to be the way to go these days, and it’s built into OS X.

the native FTP client can also be scripted very easily. you should check both ‘man curl’ and ‘man ftp’ and see if they don’t have what you need. also, a search of these boards for ‘curl’ might be of use.

cheers.

Never mind I got it :smiley: