Skip to main content

You have to double the backslashes and also escape the other spaces:

do shell script "rm -r ~/Library/Application\\ Support/Google/Chrome/Default/Pepper\\ Data/Shockwave\\ Flash"

do shell script "rm -r ~/Library/Application\\ Support/Google/Chrome/Default/Pepper\\ Data/Shockwave\\ Flash"

Oror escape the path some other way:

do shell script "rm -r ~/'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash'"

do shell script "rm -r ~/'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash'"

quoted form of replaces ' with '\'' and surrounds the string with single quotes, so it doesn't work with paths that start with ~/.

You have to double the backslashes and also escape the other spaces:

do shell script "rm -r ~/Library/Application\\ Support/Google/Chrome/Default/Pepper\\ Data/Shockwave\\ Flash"

Or escape the path some other way:

do shell script "rm -r ~/'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash'"

quoted form of replaces ' with '\'' and surrounds the string with single quotes, so it doesn't work with paths that start with ~/.

You have to double the backslashes and also escape the other spaces:

do shell script "rm -r ~/Library/Application\\ Support/Google/Chrome/Default/Pepper\\ Data/Shockwave\\ Flash"

or escape the path some other way:

do shell script "rm -r ~/'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash'"

quoted form of replaces ' with '\'' and surrounds the string with single quotes, so it doesn't work with paths that start with ~/.

Source Link
Lri
  • 106.4k
  • 19
  • 230
  • 283

You have to double the backslashes and also escape the other spaces:

do shell script "rm -r ~/Library/Application\\ Support/Google/Chrome/Default/Pepper\\ Data/Shockwave\\ Flash"

Or escape the path some other way:

do shell script "rm -r ~/'Library/Application Support/Google/Chrome/Default/Pepper Data/Shockwave Flash'"

quoted form of replaces ' with '\'' and surrounds the string with single quotes, so it doesn't work with paths that start with ~/.