We help IT Professionals succeed at work.

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

Erv Leonard
Erv Leonard asked
on
108 Views
Last Modified: 2017-04-01
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

CERTIFIED EXPERT

Commented:
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 Superintendent
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions