Access Denied trying to copy file from my PC to mapped drive.

Erv Leonard
Erv Leonard used Ask the Experts™
on
I am trying to determine the correct syntax to copy a file from my PC (in a home Workgroup) to a PC in my shop in the same workgroup. Once I have the have the syntax correct I hope to create a batch file.

SHOP is the computer name. "Files to save" is the share name. The \\SHOP\Files to share is a mapped drive I can see in Explorer and I can save files using "Copy"  and "Paste" in Explorer. Erv is the administrator on both PCs and I can remotely log into the SHOP PC.

First I tried:

C:\Users\Erv\Desktop>copy DSC06343.jpg "\\SHOP\Files to save"
The network name cannot be found.
        0 file(s) copied.

Then:
C:\Users\Erv\Desktop>copy DSC06343.jpg "\\SHOP\C$\users\Erv\files to save"
Access is denied.
        0 file(s) copied.



I have read about and tried several other syntax.

C:\Users\Erv\Desktop>copy DSC06343.jpg " \\Shop\Files to save e /user:Erv"
The filename, directory name, or volume label syntax is incorrect.
        0 file(s) copied.

"e" is the password for the SHOP PC

C:\Users\Erv\Desktop>copy DSC06343.jpg "\\Shop\files to save e/user:Erv"
The filename, directory name, or volume label syntax is incorrect.
        0 file(s) copied.

C:\Users\Erv\Desktop>copy DSC06343.jpg "\\Shop\C$\user\Erv\desktop\files to save e /user:Erv"
The filename, directory name, or volume label syntax is incorrect.
        0 file(s) copied.

Any assistance would be greatly appreciated.

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The first error "network name cannot be found" is significant.  It's either not finding the computer named SHOP or it's not finding the share.

Try the following on your pc:

Start
Run
\\shop\

If it can find the computer named "shop" and it has any shares, they'll show up.

If you get an error, then there is a problem finding a computer named "shop".  If that is the actual name, I'd disable the firewall on SHOP as a test and then try my test again.
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
The other thing is (aside from Home Group and Public Folders) you cannot access your user on PC A if PC B has a different user name.

The easiest way is to set up C:\Temp on  PC A with permissions to Everyone. Copy the files there. Then on PC A move them where you need to.
IT Engineer
Distinguished Expert 2017
Commented:
If you have map drive like let say X to \\Shop\files to save
run CMD as admin from other than shop computer

cd\
cd X:
copy C:\Users\Erv\Desktop\DSC06343.jpg
Enter

Let me know if this is working ?

Author

Commented:
Thank you. I was not using CMD as admin. When I switched to CMD admin I was able to copy the files. I also  made sure I was in the directory on my HOME PC. I also switched to xcopy to so I can copy subfolders.

cd/
cd users
cd erv
cd desktop
C:\Users\Erv\Desktop>xcopy DSC06343.jpg "\\SHOP\Files to save" /y

Thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial