Saving images from Raspberry Pi to a shared windows folder

I am running Raspbian OS on the current build (stretch). I need to be able to take a picture from a reliable camera and upload the image to a shared windows folder on my work network that has a domain controller. Right now I'm using a Logitech C910 USB webcam as a test. I can take a picture and save it to the Pi's local folders but don't know how to save directly to a shared windows folder. The commented line will save to the Pi just fine but the line that I'm trying to save to my windows folders isn't saving to the folder. Any help on how to get started and get this going would be great.

    import time
    import os
    ### Take the picture using os.system to execute in terminal
    while True: # Always true
    print('before picture')
    os.system('fswebcam -r 960x720 smb://')
    #os.system('fswebcam -r 1920x1080 /home/pi/Projects/camera/%m-%d-%Y_%H%M%S.jpg)
    print('after picture')
Tyler SinclairIT supervisorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dr. KlahnPrincipal Software EngineerCommented:
Is it a requirement that the files be transferred using an SMB shared drive?

It would be considerably simpler, imo, to use FTP and run a minimal FTP server such as BabyFTP or TinyFTP on the Windows system.  This would eliminate the need to support SMB / Samba on the Pi and free up a fair amount of memory.  The FTP client's incoming folder can still be shared among the Windows machines on the network.
Tyler SinclairIT supervisorAuthor Commented:
I will look into this as an option. Would the images being captured need to be saved to a local file on the RPi and then be uploaded via FTP? If that's the case I would just need to delete the file as it's being sent so I don't overrun the SD card.
Dr. KlahnPrincipal Software EngineerCommented:
That's the way I would approach it.  You would probably want to confirm that the file exists on the remote machine before deleting it on the Pi if the information is irreplaceable.  Along those lines you might look into CurlFTPfs, which allows mounting a remote FTP folder as a local directory.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dr. KlahnPrincipal Software EngineerCommented:
Two solutions provided by sole commenter; points assigned.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.