We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Copying a folder from drive d: to drive h: using Dos
Options

st999
Posts: 1,574 Forumite


in Techie Stuff
I have a folder on an external drive that I want to copy to another external drive and Windows 10 throws a wobbly and complains that some of the files need admin permission or trusted and doesn't copy them.
I tried copying using dos but some files copy then it stops at the same files probably because the syntax of my command is wrong.
The name of the folder will be called CannotCopy and I want it to copy from USB drive d: to USB drive h: and be called Copied.
what exactly do I type in at the command prompt to make that happen?
I can use a Windows 10 laptop.
I tried copying using dos but some files copy then it stops at the same files probably because the syntax of my command is wrong.
The name of the folder will be called CannotCopy and I want it to copy from USB drive d: to USB drive h: and be called Copied.
what exactly do I type in at the command prompt to make that happen?
I can use a Windows 10 laptop.
0
Comments
-
xcopy d:\cannotcopy h:\copied /O /X /E /H /KIf it looks like a duck, and quacks like a duck, we have at least to consider the possibility that we have a small aquatic bird of the family anatidae on our hands
0 -
If you need admin rights to copy in "Windows" you will need them in a command prompt as well. It's not a matter of changing the syntax of the command.
It's better to tackle problems by telling us the exact problem, with the exact error message and the file name(s) it occurs on. You may be able to achieve the copy using an elevated command prompt, but it depends on the error.Proud member of the wokerati, though I don't eat tofu.Home is where my books are.Solar PV 5.2kWp system, SE facing, >1% shading, installed March 2019.Mortgage free July 20230 -
https://support.microsoft.com/en-us/help/323007/how-to-copy-a-folder-to-another-folder-and-retain-its-permissions
(To explain what the above in post #2 does).0 -
I tried that and it stopped before all the files were copied with
The system cannot find the path specified.0 -
From https://answers.microsoft.com/en-us/windows/forum/windows_10-security-winpc/cannot-zip-a-folder-access-denied-windows-10/cf6a3c7c-65e4-4ec3-970e-d0526e86637a
(I found this when I looked up what would happen if trying to zip such a folder)We understand you are unable to zip a folder, we'll certainly assist you with this.
Please share this information to assist you better.
Have you made any recent changes prior to this issue?
Which build is currently installed in your computer?
The various reasons why you get an access denied error are:
a: You may not have ownership of a file or folder.
b: You may not have the proper permissions.
c: The file or folder may be Encrypted.
Refer to the below methods and check if it helps.
Method 1:
1. Right-click the file or folder, and then click Properties.
2. Click the Security tab, and then click Edit.
3. Do one of the following:
4. To set permissions for a user that is not listed under Group or user names. Click on Add and type Everyone and click on OK. Give full permissions to the folder. Then click on OK.Then try to zip to a compressed folder.
Method 2: I suggest you to perform the system maintenance troubleshooter. It will resolve the common system problems.
1. Tap on Windows Key and click on search bar.
2. Type !!!8220;Troubleshooting!!!8221; without the quotes and click on Troubleshooting.
3. Then click on System and Security.
4. Click on System Maintenance.
5. Click on Next and follow the prompts to run the troubleshooter.0 -
non of the files are zipped.0
-
A possible reason is that the file and/or folder names include blank(s).
Try adding double-quotes to the 'from' and 'to' fields.
Example (from above):
xcopy "d:\cannot copy these" "h:\copied works" /O /X /E /H /K0 -
use windows explorer to browse to to location containing "cannot copy"
RIGHT click on "cannot copy" and go to properties.
Click the security tab
Click the Advanced box
Where it says "owner ...." click on "change"
give it the username you are logged on with and verify it by clicking check names
Put a tick in the box that says "replace owner on subcontainers etc"
Click OK
The system will then give you owner status over all files and folders within.
Try the copy again, ensuring you have write access to the destination0 -
Were any of the files created in e.g. Linux? If the filenames have non standard characters in them that might cause problems.
See if you can copy them using a Linux live CD.0 -
non of the files are zipped.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.8K Banking & Borrowing
- 253K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.8K Work, Benefits & Business
- 598.6K Mortgages, Homes & Bills
- 176.8K Life & Family
- 257K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards