• 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: Coding Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding Help


  • Subject: Re: Coding Help
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 29 May 2003 15:38:01 -0700

On Thursday, May 29, 2003, at 02:18 PM, Jeff Grossman wrote:

Okay, I will give that a try. A couple more questions. The way the script
is written right now, what will happen if those files already exist in that
location? Will it override them, or add to the existing files?

It will overwrite it, but if the existing file is longer than what you write, the remmants of the original file will remain.

Trivial example. If the existing file contains "123456789" and you write "ABCDE" to the file, the file will contain "ABCDE6789"

To ensure that you overwrite the entire existing file, set EOF to zero before writing to it. To append data to the file get EOF and start writing at the next byte.

How would I
set the script up so I can save them in folders with the date or something
like that?

You want to create a new folder and name it with the current date? This will create one in your home folder:

set today to the current date
set today to (month of today) & " " & (day of today) & ", " & (year of today) as string
tell application "Finder"
make new folder at home with properties {name:today}
end tell

--> folder "May 29, 2003" of folder "michelle" of folder "Users" of startup disk of application "Finder"

--Michelle

--
You can not change the world without perforce changing yourself.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Coding Help (From: Jeff Grossman <email@hidden>)

  • Prev by Date: Re: Coding Help
  • Next by Date: Finder scripts and writing logs
  • Previous by thread: Re: Coding Help
  • Next by thread: easy quark 4 question
  • Index(es):
    • Date
    • Thread