|
It looks like you are having a similar problem with the part of the script that makes your folder, so I have separated them below. The statements used will create the folder and file if needed, and there won't be an error if they already exist.
# create folder and file if needed
set appName to "Mc_Launcher"
set baseFolder to (POSIX path of (path to application support folder from user domain) as text) & appName
do shell script "mkdir -p " & quoted form of baseFolder
set logFile to "Mc_Log.txt"
set permPath to baseFolder & "/" & logFile
do shell script "touch " & quoted form of permPath
# write to log file as needed
set FileTXT to "Login on " & (current date) & " successful, took " & timer & " seconds to complete."
set ShellLog to ("echo " & FileTXT & " >> " & quoted form of permPath)
do shell script ShellLog
|
|