• 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: carriage return & line feeds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: carriage return & line feeds


  • Subject: Re: carriage return & line feeds
  • From: Greg Strange <email@hidden>
  • Date: Wed, 06 Jun 2001 16:23:49 -0500

on 6/6/01 12:07 PM, Jonathan Neff at email@hidden wrote:

> Hi all,
>
> I'm writing an inventory report using Apple System Profiler and then I use
> URL Access Scripting to send the outputFile to an FTP location. The
> problem that i am having is that the FTP location is W2K, so the
> end-of-line characters don't work correctly. If I use RETURN to mark the
> end of each line of my file, they will not show up as separate lines on
> the remote server. So, I think I need to add another character to the end
> of my lines so that the lines show up correctly on the remote server.
> I've tried a few things already, but they either wouldn't compile or
> didn't work. Anybody have any ideas on how to accomplish this?
> Currently, I am using a double-tab to mark the end of a line, but I'd
> rather that this be more readable on the W2k end (it doesn't need to be
> nicely readable on the Mac end).
> Thanks!
> Jonathan
>
> ----------------------------------
> set outputFile "myInventory-inv.log"
> set ftpDest to "ftp://me:myword@FTPServer/users/me/";
>
> set fileRef to open for access file outputFile with write permission
> write [sometext here] & tab & tab to fileRef
> write [more text here] & tab & tab to fileRef
> close access fileRef
>
> tell application "URL Access Scripting"
> upload file outputFile to ftpDest replacing yes
> quit application "URL Access Scripting"
> end tell
> ---------------------------------
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users

Instead fo using return (or in additon to it) use

write myText & (ASCII character 10)

That will put a windows line feed at the end of it.

Hope that helps.

Greg Strange
--
I am commencing an undertaking, hitherto without precedent,
and which will never find an imitator. I desire to set before
my fellows the likeness of a man in all the truth of nature, and that man
myself.
-Rousseau, Confessions, Part I


  • Follow-Ups:
    • Re: carriage return & line feeds
      • From: Jonathan Neff <email@hidden>
  • Prev by Date: Re: carriage return and line feeds
  • Next by Date: Re: newbie text manipulation
  • Previous by thread: RE: carriage return & line feeds
  • Next by thread: Re: carriage return & line feeds
  • Index(es):
    • Date
    • Thread