0

I have the following line in AppleScript

set msgDate to (current date) as string
set removalString to "\"rm -f ~/Library/LaunchAgents/com.playlister.\"" as string    
do shell script "echo do shell script " & removalString & msgDate & ".plist" & ">> ~/Library/Playlister/" & msgDate & ".applescript"

What I'm trying to do, yet again, is pass the string

do shell script "rm -f ~/Library/LaunchAgents/com.playlister.whateverthedatestampis.plist"

with the quotes in the correct place. I'm moving stuff around quite a bit in a blind attempt to get the quotes right, and I've almost gotten it, but not quite.

Any insight or assistance is appreciated!

1 Answers1

2

Are you trying to do this?

set msgDate to (current date) as text
set removalString to "rm -f ~/Library/LaunchAgents/com.playlister."

do shell script "echo do shell script \\\"" & removalString & msgDate & ".plist\\\"" & " >> ~/Library/Playlister/" & quoted form of msgDate & ".applescript"
adayzdone
  • 11,120
  • 2
  • 20
  • 37
  • 1
    Yes. I. Freaking. Am. Thanks again @adayzdone. Really appreciate the expertise. :-) –  May 10 '13 at 04:12