I have found an interesting issue where when trying to sweep the C: drive for *.xls files with XCOPY and write a copy of these matching files to the C: that it appears that after XCOPY finds a match it doesnt progress forward, but instead starts back at root and then hits the same data again and again in a loop.
Any suggestions on how to fix this other than use an alternate physical drive. I thought a mapped drive of Y: to a folder of 000 would do the trick. But it fixed the Cyclic Error of an XCOPY of C: to C:, but now is looping back on itself as seen below.
If there is no fix by an advanced batch routine I could use a thumb drive as a temporary storage location for matches and then have the batch write this data back from the thumb drive to the C: in folder 000 after the XCOPY has completed. But then I would also have to know what drive letter the USB device will be using for multiple systems and not sure if there is a easy way to find the USB device without stating IF EXIST for the drive mount until it hits the correct one or a % % that I am unaware of to specify the thumb drive device.
C:\DataX3>net use y: \\3ghz\c$\000
The command completed successfully.
C:\DataX3>xcopy c:\*.xls y:\xls\*.* /s/d/y
C:\file3.xls
C:\000\xls\file3.xls
C:\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\file3.xls
C:\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\000\xls\file3
.xls
Terminate batch job (Y/N)?