MACSCRPT Archives

June 2006

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:
"Stockly, Ed" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 7 Jun 2006 11:00:20 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (13 lines)
I've got a shell script that I've been using on a server that's called by intellitune after a photo is processed. It needs to FTP a file to a specific address. (This is all internal, behind our firewall and security is not a big concern.)

If I type the script in to the terminal it works, which is good, because that's also how I'm learning shell scripting and debugging these scripts.

The problem is that if I run the identical command in a "do shell script foo" it fails. As a workaround I'm using terminal, but I'd prefer to not call up another app and would prefer to just run it as a do shell script.  
Is this doable? Is there a way to make the do shell script and terminal run consistently?

Here's the script I'm having trouble with:

set ftpShellScript to "ftp -d -v -u ftp://" & remoteUserid & ":" & remotePassword & "@" & remoteServer & ":21" & remotePath & fileName & " " & localFile

tell application "Terminal"
	do script ftpShellScript
	delay 3
	set shellScriptLog to contents of window 1
end tell

Ed	

ATOM RSS1 RSS2