• 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: Write to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Write to file


  • Subject: Re: Write to file
  • From: Dave Johnson <email@hidden>
  • Date: Tue, 10 Apr 2001 07:38:06 -0400

Here is a subroutine I use is some of my scripts to log errors. It is generally called from a try block
and is pased the err string err text and text string to help me figure out what happened and the name
of the calling subroutine. It writes this out to a fixed file on my ram disk. You should be able to modify
it to do the log you want.

Dave

on write_error_log(errString, errNum, name, subroutinen)
set filename to "RAM Disk:error_log"
tell application "Finder"
set errorlogfile to open for access file filename with write permission
set end_of_file to get eof errorlogfile
write (errString & tab & errNum & tab & name & tab & subroutinen & space & return & return) to errorlogfile starting at end_of_file
close access errorlogfile
end tell
end write_error_log



At 10:40 AM +0200 4/10/01, Jimmy hxiby wrote:
I have a problem with a back-up system I'm making. It is pretty simple.
On every Mac we use we have a folder, where our work is saved. This folder
is copied to one of our serverdisk, when we leave work. It is then backuped
at night.
I have made an applescript, which copies the folder to the server and
shutdowns the mac. Pretty simple. Now I would like to have a log-file of
what has been copied and when. So I can have a text-file in which all the
content of the copied folder is listed and with a date for the day it has
been copied. The next days information shall then be added at the bottom of
the text-file.
I hope somebody can help.

Jimmy Hxiby
Graphic Designer
email@hidden

Silkeborg Bogtryk
Stagehxjvej 27
Box 52
DK-8600 Silkeborg
Tlf. +45 86 82 16 55
Fax +45 86 82 11 28

$$$$$
Mac rules $$$$$
$$$$$
ooooooooooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<<
oooooooooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<<<
ooooooooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<<<<
ooooooooooo%%%%ooooooo$$$$<<<<<<$$$<<<<<<<<<<<<<
ooooooooooo%%%%oooooo$$$$<<<<<<<$$$<<<<<<<<<<<<<
ooooooooooo%%%%ooooo$$$$<<<<<<<<$$$<<<<<<<<<<<<<
ooooooooooo%%%%ooooo$$$$<<<<<<<<$$$<<<<<<<<<<<<<
ooooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<<<<<<<<
ooooooooooooooooooo$$$<<<<<<<<<<<<<<<<<<<<<<<<<<
oooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<<<<<<<<<
oooooooooooooooooo$$$<<<<<<<<<<<<<<<<<<<<<<<<<<<
oooooooooooooooooo$$$$$$$$$$$$<<<<<<<<<<<<<<<<<<
oooooooooooooooooo$$$$$$$$$$$$<<<<<<<<<<<<<<<<<<
oooooooooooooooooo$$$$$$$$$$$<<<<<<<<<<<<<<<<<<<
ooooooo%%%oooooooooooooooo$$$<<<<<<<<<$$$<<<<<<<
ooooooo%%%%%%%%%oooooooooo$$$<<$$$$$$$$$$<<<<<<<
oooooooo%%%%%%%%%%%%%%%%%%$$$$$$$$$$$$$$<<<<<<<<
ooooooooooooo%%%%%%%%%%%%%$$$$$$$$$<<<<<<<<<<<<<
oooooooooooooooooooooooooo$$$<<<<<<<<<<<<<<<<<<<
oooooooooooooooooooooooooo$$$<<<<<<<<<<<<<<<<<<<
oooooooooooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<
oooooooooooooooooooooooooo$$$$<<<<<<<<<<<<<<<<<<
$$$$
$$$$$
$$$$
_______________________________________________
applescript-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/applescript-users


References: 
 >Write to file (From: Jimmy høiby <email@hidden>)

  • Prev by Date: Scripting Eudora and a selected message
  • Next by Date: Re: Quark error -35
  • Previous by thread: Re: Write to file
  • Next by thread: Scripting Eudora and a selected message
  • Index(es):
    • Date
    • Thread