5

I am trying to use XCopy to copy all text files of folder structure to another folder, while copying the subfolder structure.

Here is what I have

xcopy /s "./Folder1/*.txt" "./Folder2/ 

The error I am getting is " Cannot perform a cyclic copy"

Any help?

Benjamin Jones
  • 987
  • 4
  • 22
  • 50

2 Answers2

3

It works with backslashes:

xcopy /s ".\Folder1\*.txt" ".\Folder2\"
skaa
  • 79
  • 1
  • That's my answer: https://stackoverflow.com/questions/38858718/npm-script-copy-package-json-to-dist-when-bundling/51371023#51371023 – IsraGab Jul 16 '18 at 22:47
0

Did you check if you are copying something where it hits the file which is running? I've experienced that if the command I'm running is somewhere where the command actually hits it stops with that error

Alban Lusitanae
  • 225
  • 3
  • 12