|
|
|
|
#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: cd\webspecial ftp -s:runspecial.txt exit runspecial.txt file: open www.starmarketandcatering.com username password cd web put c:\webspecial\specials.shtml quit Trying to replicate this with AppleScript. Any help is greatly appreciated. |
|
|
|
|
|
#2 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
|
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.net/macosx.html |
|
|
|
|
|
#3 |
|
MVP
Join Date: Jun 2007
Location: Skellefteċ, Sweden
Posts: 1,173
|
Code:
#! /bin/bash curl -T /some/where/specials.shtml -u username:password \ ftp://www.starmarketandcatering.com/web/
__________________
/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". |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|