copy command hidden files

P

Perry Diels

Hello,

I have created a simple batch file with a copy command.

copy c:\folder1\*.* c:\folder2

This works as expected, but hidden files are not copied. What's the trick to
copy the hidden files as well (and keep them hidden in the destination)

Thanks for any help,
Perry
 
R

Rob Schneider

See xcopy command (issue with /? parameter to read parameter for hidden
files).

Hope this is useful to you. Let us know.

rms
 
P

Perry Diels

Hello,

Thanks both David and Rob for your help. I forgot about "xcopy" I had used
it in the past.
Problem solved ;-)

Best regards,
Perry
 
A

Alex Nichol

Perry said:
I have created a simple batch file with a copy command.

copy c:\folder1\*.* c:\folder2

This works as expected, but hidden files are not copied. What's the trick to
copy the hidden files as well (and keep them hidden in the destination)

Use XCOPY instead. That has a /H switch for hidden files; and ones to
copy subdirectories too, and to preserve attributes, and many others.
In a command Prompt give XCOPY /? for the list
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top