How to send files to PC's via smb?

Hey All!

I use the following to mount my 2 Pc’s to my mac during the execution of a script in this order:

mount volume "smb://192.168.0.3/Desktop/" as user name "XXXXXX" with password "XXXXXXXXX"

&

mount volume "smb://192.168.0.4/Desktop/" as user name "XXXXXX" with password "XXXXXXXXX"

To send files to the PC’s which have watch folders via Powershell I use something like

do shell script "echo " & quoted form of "TEST TXT FILE " & "> /volumes/desktop/VO/" & "_VO1.txt"

However if I mount 192.168.0.4 first, that becomes /volumes/desktop/ and 192.168.0.3 becomes /volumes/desktop-1/ thus breaking the script

Is there a way to send files to the smb address or IP address to alleviate any confusion? Something along these lines, although it doesnt work:

do shell script "echo " & quoted form of "TEST TXT FILE " & " > smb://192.168.0.3/Desktop/VO/" & "_VO1.txt"

Thank you for any help you can provide!

Two options I can think of…

Option A

  1. Mount the first volume
  2. Copy your file
  3. Unmount the volume
  4. Mount the second volume
  5. Copy your file
  6. Unmount the second volume

– If done this way, both volumes will maintain their “Desktop” name without appending the “-1”

Option B
Change your “Share Names” If you create unique share names on the PC’s, when they are mounted they will not append the “-1”.

For example…
[format]smb://192.168.0.3/MachineA/[/format]
[format]smb://192.168.0.4/MachineB/[/format]