Robo Copy a File From a Network Drive to a Remote Destination Using PowerShell

0

I am attempting to copy a file from my network drive to all computers on my network but i am running into a few issues. First thing is that im getting this warning:

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : Tuesday, June 30, 2020 9:33:31 AM
2020/06/30 09:33:33 ERROR 67 (0x00000043) Getting File System Type of Source \\108wg-fs-05\03 - 
Section Folders\04 - SCM\4 - Backups" UserProfileBackup.ps1 \C$\Users\Public\Desktop \r:1 \w:0\
The network name cannot be found.

Source = \\108wg-fs-05\03 - Section Folders\04 - SCM\4 - Backups" UserProfileBackup.ps1 
\C$\Users\Public\Desktop \r:1 \w:0\
 Dest -

Files : *.*

Options : *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30

 ------------------------------------------------------------------------------

ERROR : No Destination Directory Specified.

   Simple Usage :: ROBOCOPY source destination /MIR

         source :: Source Directory (drive:\path or \\server\share\path).
    destination :: Destination Dir  (drive:\path or \\server\share\path).
           /MIR :: Mirror a complete directory tree.

For more usage information run ROBOCOPY /?


****  /MIR can DELETE files as well as copy them !

these are the 2 codes im working with this one is meant to copy a startup script to the computers on the network that connects each to the share drive

robocopy "\\108wg-fs-05\03 - Section Folders\04 - SCM\scripts\startupscript.vbs" "\\$cheese\c$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" /r:1 /w:0

This one is meant to back up user data

robocopy "\\108wg-fs-05\03 - Section Folders\04 - SCM\4 - Backups\UserProfileBackup.ps1" "\\$cheese\C$\Users\Public\Desktop" /r:1 /w:0

My goal is to get each to beable to pull their respective files from the network drive and both give me the same error. Any fixes?

powershell
robocopy
network-drive
asked on Stack Overflow Jun 30, 2020 by Zizzay

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0