0
script to create and update a log file
Community Beginner
,
/t5/framemaker-discussions/script-to-create-and-update-a-log-file/td-p/13117691
Aug 05, 2022
Aug 05, 2022
Copy link to clipboard
Copied
If the file does not exist, create the file.
If the file exists, add a new line at the end.
function writeLog(text) {
var logFile = File("C:\\Users\\USUARIO\\Documents\\logFile.log");
logFile.open("a+", "TEXT", "????");
var time = new Date();
logFile.write(time.toString() + " | " + text+"\r");
logFile.close();
}
writeLog("frist");
writeLog("second");
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Have something to add?
Join the conversation

