• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Another Shell Script question ftp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Shell Script question ftp


  • Subject: Re: Another Shell Script question ftp
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Thu, 16 Feb 2006 11:43:26 +1100


Here I am, Björn posted me a shell script which automates an ftp
session. You can attach it to a folder as an action. Then you can use
the folder as a drop box for your FTP site. It works perfectly for me.
Should I forward it to the list?


 Malcolm

Hi Malcolm,
This sound very interesting, so if you can post the code, would be great. I’m just trying to make a drop folder to do the same...

As you ask, I shall. The script is attached, it is designed to be run from Terminal.


#Usage
#autoput.tcl Username Password Ftp_Server Remote_Directory Local_Directory


Attachment: autoput.tcl
Description: Binary data



Attach this script to a folder on your desktop for extra convenience

on adding folder items to this_folder after receiving added_items
try
set shellscript to "/usr/bin/expect -f /path/to/autoput.tcl Username Password Ftp_Server Remote_Directory Local_Directory"
do shell script shellscript
end try
end adding folder items to


This script doesn't dig down further than one folder. That is, if Local_Directory contains folders it will make those folders on the remote machine and upload any files contained in them to the folders on the remote machine. If those folders contain folders the second level of folders will be ignored (or produce errors).

If anyone modifies the script to do multiple levels of folders would they post the changes back to this thread?

thanks

Malcolm
-- who is discovering that free-lancing means looking for work everyday of the week


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Another Shell Script question ftp (From: CYB <email@hidden>)

  • Prev by Date: Re: Neophyte Question
  • Next by Date: Open Mail Attachments MAIL / Eudora
  • Previous by thread: Re: Another Shell Script question ftp
  • Next by thread: Help
  • Index(es):
    • Date
    • Thread