MACSCRPT Archives

June 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Lively <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 13 Jun 2007 12:37:45 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
global myUrl
set myUrl to "[log in to unmask]" target="_blank">ftp://user:[log in to unmask]"
sendfile(choose file)

on sendfile(AFile)
	tell application "Finder" to set aname to name of AFile
	if aname ends with ".txt" then
		do shell script "curl -B -T \"" & POSIX path of AFile & "\" \"" &  
myUrl & aname & "\""
	else
		do shell script "curl -T \"" & POSIX path of AFile & "\" \"" & myUrl  
& aname & "\""
	end if
end sendfile

On Jun 13, 2007, at 12:13 PM, Andreas Kiel wrote:

> Hi all,
>
> I'm just trying to create a shell script using "ftp" to transfer  
> files from out an AppleScript. I do succeed to log in correctly to  
> the remote server but I can' put files there.
> I search the web but can't find any examples of scripts which would  
> work with the "do shell script"
> I found one AppleScript which uses curl, but that didn't work either.
>
> Maybe somebody got an idea.
>
> Thanks
> Andreas
>

ATOM RSS1 RSS2