2

I use this command in order to copy all .ini files (with recursion):
xcopy c:\folder1\folder1A\*.ini c:\mybackup /sy It doesn't copy any file.

There exist desktop.ini files (including comments) within folders and subfolders of folder1A that I want to get a copy of with recursion.

I have tried running CMD as administrator, but it tells 0 File(s) copied. How could I get this to work?

Ctznkane525
  • 7,297
  • 3
  • 16
  • 40
Omar
  • 6,681
  • 5
  • 21
  • 36
  • 2
    https://stackoverflow.com/questions/7812037/telling-xcopy-to-copy-hidden-folders-as-well-as-hidden-files ? – Marged Feb 11 '18 at 20:38

1 Answers1

2

Add the /h option:
/H Copies hidden and system files also. (more info)

This works:
xcopy c:\folder1\folder1A\*.ini c:\mybackup /syh

Thanks to Marged's comment mentioning this question.

Omar
  • 6,681
  • 5
  • 21
  • 36