Foscam C2M save snapshot to SD card

Ok. From your description I had the impression that you would like to do it in different way - reading it again I see that I have slightly misinterpreted it.

This should be one option:

var String Status = executeCommandLine( Duration.ofSeconds(5), "/usr/bin/curl","http://xxx.xxx.xxx.xxx:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture", "-o", "/path/to/store/your.jpg" )

An other one - to get the picture into an item / a variable is described in oH 3.1 Download an image from the internet and save into a item of the type Image - #4 by Bredmich which I use to retrieve the picture from my CAM and send it via telegram. This one would require modification to write the file to the SD card.

Other methods I haven’t tried.