MACSCRPT Archives

February 2009

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:
Thu, 19 Feb 2009 19:11:26 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
>> How does the curl call "fail"?

Either file not found or directory not found.

>>What directory do they change to to fix it?

He says he uses cld for change local directory... What's the difference
between that and cd?

>>I assume the file to be uploaded is an absolute path?
  set myFile to quoted form of POSIX path of myFile

This command coerces an alias to a file on the local drive to a posix path.
Does that make it absolute?

> You can certainly cd before the curl:
> do shell script "cd /some/where/else; curl ..."
> Or, better,
> do shell script "cd /some/where/else && curl ..."
  
  I think that's exactly what I'm looking for... And I'll need to toy with
it to figure out where it all goes together...

Something like this.... ?  Or maybe the /usr/bin go before the cd?

Thanks!

Ed
  
  set  ftpUploadScript to {"cd "}
  set the end of ftpUploadScript to posixPathtoMyFile
  set the end of ftpUploadScript to " && "
  set the end of ftpUploadScript to "/usr/bin/curl"
  set the end of ftpUploadScript to " ftp://"
  set the end of ftpUploadScript to myUserid
  set the end of ftpUploadScript to ":" & myPassword
  set the end of ftpUploadScript to "@" & myServer & myRemotePath
  set the end of ftpUploadScript to " -T"
  set the end of ftpUploadScript to myFileNAME
    

ATOM RSS1 RSS2