Question

I have two code bases of an application. I need to copy all the files in all the directories with .java from the newer code base, to the older (so I can commit it to svn).

How can I write a batch files to do this?

Was it helpful?

Solution

XCOPY /D ?

xcopy c:\olddir\*.java c:\newdir /D /E /Q /Y

OTHER TIPS

If you've lots of different instances of this problem to solve, I've had some success with Apache Ant for this kind of copy/update/backup kind of thing.

There is a bit of a learning curve, though, and it does require you to have a Java runtime environment installed.

I like Robocopy ("Robust File Copy"). It is a command-line directory replication command. It was available as part of the Windows Resource Kit, and is introduced as a standard feature of Windows Vista and Windows Server 2008.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top