4 Replies Latest reply: Mar 30, 2014 1:03 PM by MrHoffman
JoshFree Level 1 (5 points)

When moving a file or folder, it plays a sound to notify you its been moved,copied, etc.


Is there a way to silence/stop that sound from playing via applescript?

Mac mini, Other OS, 10.8.3
  • MrHoffman Level 6 (14,762 points)

    Not sure what you're after...


    If you want to shut off all of the interface sound effects, see the HT2490 tech note for details.


    If you want to script and to move files around without triggering sounds, there are various ways to do that, including via direct bash commands.

  • JoshFree Level 1 (5 points)

    I thought was pretty apparent of what was wanted. Did you happen to have an example of bash commands? I'm not that familiar with them.


    Thanks for your time.


    - Josh

  • JoshFree Level 1 (5 points)

    And maybe more specifically turn of system sounds via AS, or a shell script cmds.

  • MrHoffman Level 6 (14,762 points)

    There's no command to shut off the Finder sound effects for one move (short of shutting off all sounds for that move and then turning it back on); it's all or nothing.


    The command line command to move a file is mv.  There will be no sound effects for files moved via mv.


    Here's an example command sequence that moves to your login directory (the cd with no parameters), creates an empty file using the touch command, then renames and relocates that file using the mv command:


    touch name.tmp

    mv name.tmp Downloads/newname.tmp


    If you specify directory paths on the parameters to the mv command, then the file will be relocated.  This example shows a relative (relative to the current directory) path specification with the Downloads/newname.tmp reference.


    There are other options available including Python scripts — which are handy for some tasks, because Python can use the system frameworks via pyobjc bridging.


    FWIW, unless I'm specifically scripting a GUI application that doesn't have a command interface or specifically dealing with Apple events, I generally prefer to avoid AppleScript.  Scripting tools such as bash and Python can be good choices here.   If you're interested in using or are otherwise fond of it, AppleScript can invoke bash commands or a bash shell script just fine — which would be one way to avoid the file-move sound effect.