Copy CAM image to network drive w/ overwrite?

Posted on
Mon Apr 27, 2015 11:17 am
DrLove offline
Posts: 260
Joined: Dec 12, 2014
Location: Sweden

Copy CAM image to network drive w/ overwrite?

Hi!

Trying to copy a snapshot of my door cam when door bell is activated to my web server and then have pushover/prowl send me an URL to that image.

What I'm looking for is a script that takes an URL image and put it on a network folder.

I have managed to copy the image to my local Indigo computer desktop (below) but not overwrite existing image and not to a network share.

Applescript:
Code: Select all
set {tUrl, dFolder} to {"http://<user>:<psw>@<IP>:80/axis-cgi/jpg/image.cgi?camera=3", "~/Desktop/"}

set {oAStid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
set fName to "Image.jpg" as string
set AppleScript's text item delimiters to oAStid

do shell script ("mkdir -p " & dFolder & "; curl -A/--user-agent " & tUrl & " >> " & (dFolder & fName))


Anyone know how to do this?

Best regards, L

Love Kull (yes it's my name)
Blog (in Swedish)
Sweden

Posted on
Fri Aug 14, 2015 3:23 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Copy CAM image to network drive w/ overwrite?

I put my images in a folder on the desktop and have this snippet at the end of my code

Code: Select all
delay 2
tell application "Finder"
   delete folder "IPCam"
end tell

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests