Announcement

Collapse
No announcement yet.

Copy file to another PC on the network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Copy file to another PC on the network

    I'm trying to write a script to copy a file from a HomeTroller Zee S2 to another PC on my local network. I have a shared folder on the PC with Read/Write permission for Everyone, but I can't get the file to copy over.

    Sub Main(ByVal param as Object)
    Dim src_path as String = "/usr/local/HomeSeer/scripts/ShutDown.txt"
    Dim dest_path as String = "\\DESKTOP-DKKAAHF\Copy\ShutDown.txt"
    My.Computer.FileSystem.CopyFile(src_path, dest_path,true)
    End Sub

    Thank you,

    Ron

    #2
    See if this helps: https://docs.microsoft.com/en-us/dot...rent-directory

    Comment


      #3
      By default, the Raspberry Pi doesn't do Windows CIFS. You'll need to install 'Samba' - see https://www.raspberrypi.org/document...ccess/samba.md

      Comment


        #4
        So, then, I presume that the user logged into the PI would have to have "write" rights on the file share on the PC?

        @
        ni1200,
        are you just trying to back up files from the Zee? If so, I make copies of files (and zip them) which are placed in the HomeSeer HTML folder. Then you can use a web browser to pull down the files via the PC. Another option is to use FTP. You can enable the Windows FTP service and then use HomeSeer's scripting language to ftp the files to the PC. Make sure though that you put the Windows FTP service on a different port.
        HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

        Comment


          #5
          Thanks guys, I will try your suggestions this weekend. I'm actually trying to get several office PCs to shut down when I arm my alarm system. The easiest way that I could think of doing it was to send a file to a directory on each PC which will trigger a powershell script to force the computer to shut down.

          Comment

          Working...
          X