Re: Write to file
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