Quantcast
Viewing all articles
Browse latest Browse all 21975

Robocopy Error 3 (System cannot find path specified) and Error 5 (Access Denied)?

So I am really new to Powershell and just yesterday learned about Robocopy.

I have been trying to find a solution to this problem:

I wrote a script in Powershell that is to simulate a "Backup". It  should copy files, using Robocopy, from user specified folders on a server to a user specified location elsewhere.

Right now, I have been testing it various ways.

1) One way I tried testing it was mapping the server's location as a network drive. I currently have it as drive V:\.
Whenever I run the script, I get this error:

Get-Item: Cannot find drive. A drive with the name 'V' does not exist.
ERROR 3 (0x00000003) Accessing Source Directory V:\
The System cannot find the path specified.

I'm using Robocopy like this: robocopy $spath $newFolder /COPY:DAT /b

2) The first time I tried test my script, I was trying to access directly to the server. $spath = \\###.###.##.###\
Whenver I tried this, this is the error I got:

Get-Item : Cannot find path '\\###.###.##.###\' because it does not exist.
ERROR 5 (0x00000005) Accessing Source Directory \\###.###.##.##\
Access is denied.


I am running Powershell as an administrator, on the administrator account on this computer (It's just for testing, but it's a Windows 7 desktop).
Any ideas?


Edit: The destination path is a hard drive that we have connected USB 2.0

Viewing all articles
Browse latest Browse all 21975

Trending Articles