Solved copy hidden files in dos?

July 4, 2014 at 18:42:50
Specs: Windows 64
I notice files that are marked as hidden in windows dont get displayed in dos and dont get recognized sometimes when running a batch. So is there a dos command:

1) to copy a file even if its marked as hidden in the file properties

and

A command that would automatically make all files in a folder become "unhidden" so that they can be copied.

Thank you!


See More: copy hidden files in dos?

Report •

#1
July 4, 2014 at 19:45:41
✔ Best Answer
From command prompt (dos) you can type the command followed by /? to get a listing of available switches. For the copy command copy/? you'll find there are no switches to copy hidden files. XCOPY however does have a switch to copy hidden files.

You use the ATTRIB command to change a file's attribute, including the hide/unhide option. However you can't change the attribute of a file that's 'in use'.

Some system files may not show even though they don't actually have the hidden attribute set.

You can choose to have windows show hidden and system files from the 'folder options' menu. But that won't change anything when using command prompt.

Most of the time you won't want to change the hide and system attribute as windows doesn't want you messing with those files and generally doesn't want them moved.

Oh, and to view hidden files using the DIR command just type dir/a:h

message edited by DAVEINCAPS


Report •

#2
July 5, 2014 at 12:50:50
The dir/a:h is what I was looking for. Thanks.



Report •

#3
July 5, 2014 at 20:44:13
You're welcome. I'm glad that helped.

Report •
Related Solutions


Ask Question