Permissions issue?? [write log to home folder]

Hi all,

I am writing to a log file through a shell script in my applescript, as well as then passing the output to another log file. If I write the command like this:

do shell script "/Applications/ffmpegx.app/Contents/Resources/ffmpeg -passlogfile \"~/Library/Logs/pass\" &>~Library/Logs/ffmpeg_transcode/mylog.log.txt"

I get an error: ~/Library/Logs/pass-0.log: No such file or directory

But if I run the script like this:

do shell script "/Applications/ffmpegx.app/Contents/Resources/ffmpeg -passlogfile \"/pass\""

It writes it fine to the HD and I get no error. Yet it writes the output log fine to my home folder. Why will it write the first log to the HD but not anywhere in my home directory? I would leave it like this, but I don’t want this user to have admin privs, so I’d like it to write the file into the home folder.

I am stumped!

does this work?

do shell script "/Applications/ffmpegx.app/Contents/Resources/ffmpeg -passlogfile ~/Library/Logs/ffmpeg_transcode/mylog.log.txt"

I am trying to doing one more thing with the text file created with a similar command. I would like the outputted text file to display in a popup window. I would like the user to know that the running script is done and to display the contents of a txt file upon finishing.

Do you know how to do that?

packhater@yahoo.com

Hi,

taking the example from above just read the text from the file and display it

set t to ((path to library folder from user domain as text) & "Logs:ffmpeg_transcode:mylog.log.txt")
do shell script "/Applications/ffmpegx.app/Contents/Resources/ffmpeg -passlogfile " & quoted form of POSIX path of t
display dialog (read file t)

in my script, I create a txt file outputted from a command.
When I use this command in my script…display dialog (do shell script “cat ~/dsconfig.txt”)
everything works fine and it displays with an OK or Cancel option. This is great except the problem is that the formatting of the text is a little messy. When I open that same txt file in textedit, the formatting is correct, spacing tabs, etc.

I would like it to display the correct formatting of the text file so that it looks good on the screen for the user. The previous command works fine, I’m just a little picky and want to clean the output a little.

Is there another way to display on the screen what I want? Maybe something else besides display dialog?