AppleScript to record webcam video I am new to AppleScript and trying to write a script to record from webcam for say X seconds.

The script below gives an error that I do not have permission to save this file to Desktop. How can I avoid this error? 

Secondly how can I save the file with Date and Time stamp appended in the name of the file?

tellapplication "QuickTime Player"  
  set newMovieRecording to new movie recording  

  tell newMovieRecording  
  start  
  delay 5  
  pause  
  save newMovieRecording in "/users/rohitbhutani/desktop/movie.mov"  
  stop  
  close newMovieRecording  
  end tell
Someone at Apple communities helped me resolve the issue. Posting an answer if someone faces the same issue. 

 set theCurrentDate to current date
set dateTime to short date string of theCurrentDate &amp; space &amp; time string of theCurrentDate
set P to offset of "/" in dateTime
set dateTime to text 1 through (P - 1) of dateTime &amp; "-" &amp; text (P + 1) through -1 of dateTime
set P to offset of "/" in dateTime
set dateTime to text 1 through (P - 1) of dateTime &amp; "-" &amp; text (P + 1) through -1 of dateTime
set theFilePath to "/Users/rohitbhutani/Desktop/movie " &amp; dateTime &amp; ".mov"

tell application "QuickTime Player"
     set newMovieRecording to new movie recording
     tell newMovieRecording
           start
           delay 5
           pause
           save newMovieRecording in POSIX file theFilePath
           stop
           close newMovieRecording
     end tell
end tell