Re: Creating a log file.
Re: Creating a log file.
- Subject: Re: Creating a log file.
- From: Johnny AppleScript <email@hidden>
- Date: Wed, 20 Oct 2004 12:47:20 -0600
Title: Re: Creating a log file.
set logPath to "/path/to/logfolder/logfile.log" -- UNIX path form
set logMessage to "my log message"
my logToFile(logMessage)
on logToFile(logMessage)
set quotes to "\"" -- protect strings with spaces or special characters
do shell script "echo " & quotes & logMessage & quotes & " >> " & quotes & logPath & quotes
end logToFile
On 04/10/20 12:28 PM, "Vic Piercy" <email@hidden> wrote:
> I am trying to create a log file from Applescript. I would like to save
> the log file to a specific location. I have been able to create a log
> file from an existing file that is on my desktop by using open for
> access (path to desktop) "Log.txt", but I would like to create a new
> log file and save it to a different folder with a different name
> without having to open a file. Can anyone help? Thank you in advance!!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden