Go Back   The macosxhints Forums > Working with OS X > OS X Developer

Thread Tools Rate Thread Display Modes
Old 07-17-2008, 05:13 PM   #1
Registered User
Join Date: Jul 2008
Posts: 1
AppleScript FTP putting files

I am new to Mac and AppleScript. Trying to figure out how to replicate a PC batch file.

Batch file changes directory, issues ftp command that pulls in a .txt file with the ftp commands. The .txt file logs in, changes to correct directory and uses "put" command to load the file.

Batch file:
ftp -s:runspecial.txt

runspecial.txt file:
open www.starmarketandcatering.com
cd web
put c:\webspecial\specials.shtml

Trying to replicate this with AppleScript. Any help is greatly appreciated.
cdoyle1966 is offline   Reply With Quote
Old 07-17-2008, 05:44 PM   #2
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 32,464
I'd look more to a shell script than to AppleScript. AppleScript's strength is interacting with GUI apps which you don't seem to be doing here.

Look also at the 'expect' command: read 'man expect'
hayne is offline   Reply With Quote
Old 07-17-2008, 08:26 PM   #3
Join Date: Jun 2007
Location: Skellefteċ, Sweden
Posts: 1,173
#! /bin/bash
curl -T /some/where/specials.shtml -u username:password \
/Bengt-Arne Fjellner IT-Administrator Luleċ university, Sweden.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
baf is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 10:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.