I have looked on a lot of the questions here and I dont see really what I need. I am trying to create a batch file that pulls 6 log files from 2 different places.
The first开发者_如何学C place its pulling them from is the C:\ Second place is C:\COSS\CossEnterpriseSuite\Exes\
I am wanting it to pull the *.log files and for it to put them in a folder called ERRORLOG on the C:.
If anyone could help me with this it would be great the stress level is raising.
Try this:
xcopy /y C:\*.log C:\ERRORLOG
xcopy /y C:\COSS\CossEnterpriseSuite\Exes\*.log C:\ERRORLOG
This will wildcard-copy anything that ends with the .log extension from the directories you mentioned, dropping them in the C:\ERRORLOG directory. The /y switch makes sure it doesn't prompt before overwriting existing files.
精彩评论